Question: First, give in pseudocode a procedure Delete(A, i) that deletes A[i] from binary heap A that currently has n elements. Then analyze carefully the time
First, give in pseudocode a procedure Delete(A, i) that deletes A[i] from binary heap A that currently has n elements. Then analyze carefully the time complexity of your algorithm. Note: If it is easier to assume that the binary heap is stored in A[1..n] you may do this. Just indicate if you are assuming that the array is stored in A[1..n] or A[0..n 1]. Hint: Use ideas from the algorithm for removing the maximum from a binary heap.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
