Merge sorted arrays, then sort files too large for memory

0
Remix
  1. Merge two sorted arrays of integers into one sorted array.
  2. The two inputs are now huge files that don't fit in memory. Merge them with bounded memory and buffered reads and writes.
  3. 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.
NvidiaCodingLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.