Question: Write down a pseudo code for deleteMax(p) of a max heap. Prove that the heap saisies the heap property when your algorithm terminates. Also show
Write down a pseudo code for deleteMax(p) of a max heap.
Prove that the heap saisies the heap property when your algorithm terminates. Also show that it runs in O(logn) time where n is the current number of elements in the heap.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
