Question: Only highlighted array. (a - 15 pts) Construct a max heap of the array. Show the initial essentially complete binary tree and the transformation of

 Only highlighted array. (a - 15 pts) Construct a max heap

of the array. Show the initial essentially complete binary tree and the

Only highlighted array.

(a - 15 pts) Construct a max heap of the array. Show the initial essentially complete binary tree and the transformation of the binary tree to a max heap via the reheapify operations at the indices of the internal nodes (as shown in the slides). (b 15 pts) Sort the max heap version of the array obtained from (a) to obtain a sorted array of integers. Show the structural changes in the max heap in each iteration. (c 7 pts) Transform the max heap of (a) to a binary search tree. (d -8 pts) For the binary search tree obtained in (c), determine the average number of comparisons fora successful search and the average number of comparisons for an unsuccessful search (e-8 pts) Use the sorted array of (b) to construct a binary search tree. (f - 7 pts) For the binary search tree obtained in (e), determine the average number of comparisons for a successful search and the average number of comparisons for an unsuccessful search. (g-7 pts) Construct a hash table of the given array using a hash function H(K) - K mod 5. (h-8 pts) For the hash table of (g), determine the average number of comparisons for a successful search and the worst case number of comparisons for an unsuccessful search. (i - 25 pts) Consider the elements of the array assigned to you are known only one at a time. Construct a sequence of priority queues (as max heaps) with the insertion (enqueue) of one element at a time, as shown in the slides

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!