Question: please help Question 6 (Total 12 marks): Heaps Given the following list of numbers: 30, 44, 97, 36, 61, 38, 86, 74, 51, 35 a)

please help
Question 6 (Total 12 marks): Heaps Given the following list of numbers: 30, 44, 97, 36, 61, 38, 86, 74, 51, 35 a) (2 marks). Draw the heap (as a tree diagram) that would be built if the above numbers were inserted as priorities into a max heap in the order they are listed. (Show your working). b) (2 marks). Convert the heap tree in your answer from part (a) into an array representation of the tree. c) (2 marks). Show what the array form of the heap would look like while inserting the value of 95 into the heap (show each step of the trickle-up process). f) (6 marks). Do you agree with the statement: "A heap tree is the only efficient way to implement a priority queue"? Discuss this with reference to time complexity
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
