โ† Google questions

Select a sample of K records from a 1TB file

Filed under Google

The question

Given a massive file of size 1TB containing N records on disk, design an efficient solution to select a random sample of K records, and discuss underlying OS concepts regarding file storage in hard disks.

No write-up yet. Related questions below have one.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.