Deduplicate a 256 GB file with 128 MB of memory

0
Remix

A 256 GB file holds records, some duplicated. The machine has 128 MB of memory. Produce output that holds every distinct record exactly once. Explain the approach (for example hash partitioning into buckets that fit in memory, or external sort then a merge pass), how many passes over the data it takes, and what happens if one bucket is still too big.

WaymoCodingLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.