A median heap supports the following operations insert


Question: A median heap supports the following operations: insert, findKth, and removeKth. The last two find and remove, respectively, the Kth smallest element (where k is a parameter). The simplest implementation maintains the data in sorted order. Do the following:

a. Describe the algorithms that can be used to support median heap operations.

b. What is the Big-Oh running time for each of the basic operations using these algorithms?

c. Write an implementation that uses these algorithms.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: A median heap supports the following operations insert
Reference No:- TGS02457693

Now Priced at $15 (50% Discount)

Recommended (91%)

Rated (4.3/5)