Sort a file with huge volume of data given memory constraint

It looks like what you are looking for is
external sorting.

Basically, you sort small chunks of data first, write it back to the disk and then iterate over those to sort all.

Leave a Comment