← Questions

Deduplicate a 256 GB file with 128 MB of memory

0
WaymoCodingLast asked Sep 2026

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.

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