Question 2: [0] 87 A heap is stored in an array. [1] 78 [2] 53 [3] 45 [4] 65 [5] 09 [6] 31 [7] 17 [8] 23 1) Draw the heap based on the given array. Suppose this heap represents a queue. 2) Then dequeue elements one by one from this queue until the queue is empty. Draw the status after every dequeue operation (totally 9 figures, you just need to give the status after dequeue operation and reheapdown operation)

icon
Related questions
Question

Refer to image and show on paper! 

Question 2:
[0]
87
A heap is stored in an array.
[1]
78
[2]
53
[3]
45
[4]
65
[5]
09
[6]
31
[7]
17
[8]
23
1) Draw the heap based on the given array. Suppose this heap represents a queue.
2) Then dequeue elements one by one from this queue until the queue is empty. Draw the
status after every dequeue operation (totally 9 figures, you just need to give the status after
dequeue operation and reheapdown operation)
Transcribed Image Text:Question 2: [0] 87 A heap is stored in an array. [1] 78 [2] 53 [3] 45 [4] 65 [5] 09 [6] 31 [7] 17 [8] 23 1) Draw the heap based on the given array. Suppose this heap represents a queue. 2) Then dequeue elements one by one from this queue until the queue is empty. Draw the status after every dequeue operation (totally 9 figures, you just need to give the status after dequeue operation and reheapdown operation)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer