Consider an ordinary binary min-heap data structure with n elements that supports the instructions INSERT and EXTRACT-MIN

Question:

Consider an ordinary binary min-heap data structure with n elements that supports the instructions INSERT and EXTRACT-MIN in O (lg n) worst-case time. Give a potential function Φ such that the amortized cost of INSERT is O (lg n) and the amortized cost of EXTRACT-MIN is O (1), and show that it works.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Introduction to Algorithms

ISBN: 978-0262033848

3rd edition

Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest

Question Posted: