Merging sorted lists using heaps


Question:

Merging Sorted Lists Using Heaps

Figuring out an algorithm that will merge k sorted lists into one sorted lists in O(n lg k) time where n is the number of elements in ALL the input lists.

Believe we are supposed to use a Heap for k-way merging.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Merging sorted lists using heaps
Reference No:- TGS01936945

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)