Here is the problem:
I have only 1GB RAM in computer. I have a text file of 10 GB data.This file contains numbers. How will I sort them?
Adding some more details.
-They are all integers like 10000, 16723998 etc.
-same integer values can be repeatedly appearing in the file.
split the file into parts (buffers) that you can sort in-place
then when all buffers are sorted take 2 (or more) at the time and merge them (like merge sort) until there’s only 1 buffer remaining which will be the sorted file