Question: 5. Short Questions: a) Given 5000 sorted data, if you apply Binary Search Algorithm, what will be the worst case runtime (write down the proper

5. Short Questions:

a) Given 5000 sorted data, if you apply Binary Search Algorithm, what will be the worst case runtime (write down the proper formula and then compute, round up to an integer in the high side, i.e. 13.2 should be rounded to 14)

b) What is the height of a balanced Binary Search Tree with N number of nodes?

c) What is the main difference between a Max Heap and a Min Heap?

d) What is the key difference between a Max Heap and a Binary Search Tree?

e) Given 1000 random data, if you use Sequential search, what will be the worst case runtime?

f) Why Binary Search Tree is a preferred algorithm over the Binary Search Algorithm when the data are random?

g) Explain the MaxHeapify operation on a particular node I

h) Given the following data: 45, 40, 35, 30, 25, 20, 15, 10, 5, 0

If you use Merge Sort to sort these data, what will be the runtime. (Use appropriate formula and then get the answer as an integer number).

i) Given the following tree:

Is this a Max Heap or a Binary Search Tree? Give proper reasoning.

j) Given the Binary Search Tree as below.

What will be the pre-order and post-order traversal order?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!