526 views

1 Answer

0 votes
0 votes
Heap_Delete(A,i)

{

A[i] = A[A.heapsize]

A.heapsize--

Max_heapify(A,i)

}

Related questions

0 votes
0 votes
0 answers
1
akash.dinkar12 asked Jun 27, 2019
314 views
Give an $O(n\lg\ k)$- time algorithm to merge $k$ sorted lists into one sorted list, where $n$ is the total number of elements in all the input lists. (Hint: Use a minhea...
0 votes
0 votes
0 answers
2
akash.dinkar12 asked Jun 27, 2019
371 views
Show how to implement a first-in, first-out queue with a priority queue. Show how to implement a stack with a priority queue.
0 votes
0 votes
0 answers
3
akash.dinkar12 asked Jun 27, 2019
261 views
Each exchange operation on line $5$ of HEAP-INCREASE-KEY typically requires three assignments. Show how to use the idea of the inner loop of INSERTION-SORT to reduce the ...