Interview Question

Interview Mountain View, CA

What is the best way to sort a terabyte of array of data

  , when you have limited RAM (500k), and each array element has a couple of items of data, at about 1-10k each.

Interview Answer

6 Answers


You had to know sorting, memory management, Big-O calculations, and data structures.

Interview Candidate on Feb 6, 2012

This post has been removed.
Please see our Community Guidelines or Terms of Service for more information.


External merge sort is the answer

sri on Feb 21, 2012

External merge sort. First load the data chunk by chunk, sort it in-memory (by quicksort for example) and write it back in chunks. After this, use merge sort on the chunks. This is how most databases do sorting.

Anonymous on Apr 8, 2012

Shoot me I anyone ever asks me this an interview.

Anonymous on Jun 13, 2015

How is this relevant to a product manager role? This is an engineering problem

Anonymous on Jul 13, 2015

Add Answers or Comments

To comment on this, Sign In or Sign Up.