Question: 2 What does the initially empty max-heap h contain after the following sequence of pseudo code operations? Show at least 3 binary heaps as stated

2 What does the initially empty max-heap h contain after the following sequence of pseudo code operations? Show at least 3 binary heaps as stated in Figure 02.1 to show the changes after a sequence of heap operations. 3 marks) b.heapInsert (16) h.heapInsert (19) binary beaps iii. b.heaplosert (5), .heapInsert (7); b.heapDelete lite) binary heaps i, b.heapInsert (24) h.heapInsert (29) h.heaplasert (15) binary beaps. h.heapDelete (item) Figure Q2.1 : Pseudo code operations . Answer the following question on leftist heap and skew heap: 1. Merge the following two skew min-heaps in Figure Q2.2. 13 24 16 15 44 44 19 13 2 62 29 84 67 Figure Q2.2: Skew min-heaps [3 marks] Perform the following operations into an initially empty leftist min-heap. Note that a number indicates an insert operation and a D indicates a delere operation Show the final tree 1519 25 36 D 23 16 D 15 [3 marks] Discuss the differences between leftist heap and skew heap. Also compare the complexity of the two heaps especially in the amortized analysis. [4 marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
