Question: QUESTION 1: [2 POINTS) Using the following heap , delete the element of index 2, You can only use Maxheapify(), ExtractMax(),IncreaseKey(, BuildHeap(). Then give the



QUESTION 1: [2 POINTS) Using the following heap , delete the element of index 2, You can only use Maxheapify(), ExtractMax(),IncreaseKey(, BuildHeap(). Then give the complexity of your soultion. Your answer is calling the set of later functions correctly. Heap: 1 5 5 6 9 11 8 15 01 17 21 Stored as: 0 1 2 3 4 5 6 7 8 9 1 5 6 9 11 8 15 17 21 a[ ] Given the following array A of integer elements: 2 3 5 7 8 9 11 14 a) Show the contents of the array in a binary tree form. [1 Points] QUESTION 3: [5 POINTS] Apply BFS on the following graph starting at vertex 0. Propose your own discovery order for children's inside the queue. On the resulted BFS-tree, show the distance and predecessor for each vertex. You can use arrays to show the distance and the predecessor. 0 3 1 2 4 5 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
