Merge sorted arrays, then sort files too large for memory
- Merge two sorted arrays of integers into one sorted array.
- The two inputs are now huge files that don't fit in memory. Merge them with bounded memory and buffered reads and writes.
- Now sort N large unsorted files into one globally sorted output: sort chunks, then do a K-way merge with a heap, and discuss doing it across several machines.
No answer yet. Write the first one; the best answer gets endorsed.
