← Questions

Merge sorted arrays, then sort files too large for memory

0
NvidiaCodingLast asked Sep 2026
  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.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding