Question: 8 ) a ) Define binary search tree. b ) Why were we able to implement the binary search trees entirely by developing a class
a Define binary search tree.
b Why were we able to implement the binary search trees entirely by developing a class to represent binary search tree nodes?
c What was the one problem we encountered with this implementation?
d How can this problem be overcome?
Write two search methods for binary search trees, one implemented using linked nodes and the other an array.
PART IV
Given the following list of inputs:
a Trace the development of the heap in abstract form that would evolve by inserting the inputs in the order that they are presented.
b Draw the final version of the array representation of this heap, ie you need not show the array develop.
c What property of a heap led to the array being smaller than that of the binary search tree in problem b
d Why are heaps generally implemented with an array and not a linked structure?
Write an insert function for a heap class as well as all support functions that are called by your insert function.
Given the following list of values:
Trace the steps of applying heapsort using both an array and a linked structure representation for the trace.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
