Back to problems

External Merge Sort with a Heap

Algorithm · Citadel · Medium

Problem: External Merge Sort Using a Min-Heap Sort a collection of integers that is too large to reside in memory simultaneously. You receive: n, the total count of integers m, the memory limit measured in integers The following n integer values Model the external merge-sort process as follows: Take no more than m values at a time and make them into a chunk. Sort every chunk while it is in memory, creating several sorted runs. Merge all sorted runs with a min-heap using a…

Checking your access…