I have to sort around 12GB of integer data which is kept in a file. I have a 1 GB RAM. How should I do it? The problem is I cant read whole of data together and store it in a vector because it goes out of memory bound. Which sorting algorithm should I use? I have to do it quickly. When I googled for this I got a line on the page http://en.wikipedia.org/wiki/Sorting_algorithm#Memory_usage_patterns_and_index_sorting saying "combine two algorithms in a way that takes advantages of the strength of each to improve overall performance." It suggests using quicksort on small data and then merging it. But ultimately merging will also require the data to be in RAM which is impossible.
What is the solution around this problem?
Thanks in advance