Interview Question: Randomize That

Sample Question #22 (programming)

This is a tougher version of the previous question (#21).

You get the same input file x.txt with millions of records sorted by ID. However, some records are missing either age or income.

Now, your task is to write a program to pull out a random sample of 10,000 records, but only those with neither age nor income missing.

(Comment: both questions #21 and #22 test your ability to both write a working program and to produce an efficient program – but foremost you must write a program that works correctly)

Advertisements
This entry was posted in Sample Qs. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s