In: Computer Science
Visualize the initially empty myHeap after the following
sequence of operations
o myHeap.add(2)
o myHeap.add(3)
o myHeap.add(4)
o myHeap.add(1)
o myHeap.add(9)
o myHeap.remove()
o myHeap.add(7)
o myHeap.add(6)
o myHeap.remove()
o myHeap.add(5)
what I understood in question
solved accordingly both max heap and min heap
anything doubtful or not understand just comment I will touch with you
please upvote for my effort
thank you and all the best