System DesignReported in a candidate post, Jul 2021
Removing duplicate lines from a 10 GB file with 2 GB memory
Filed under Morgan Stanley
The question
Design a strategy to remove duplicate lines from a file that exceeds available RAM.
No write-up yet. Related questions below have one.
Related Morgan Stanley questions
Collected from public candidate posts and coding forums. Updated Nov 2026.