I have 50 text files of around 10 gb of numbers. I have to sort these numbers. My first idea is to use apply Merge Sort i.e. Sort each file separately and merge them. I am using array to load these numbers. and when I run the application my program crashes due lack of memory. So My Question is:
- Which data structure to use?
- How to manage the memory?
- Is merge sort correct approach? if not please suggest the way.
Any help will be appreciated.