Yahoo Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

Use External sort

- shekar July 17, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

External sort is the right answer.

- Anon August 04, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

this is the right answer, for sure

- gaurav September 05, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

External sort is the ans. It uses merge sort as the base

- anshulzunke September 17, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

yup...dis one correct...

- dig July 21, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

use quick sort

- bloomberg sucks June 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Here's a pointer.
If you can't fit the data into virtual memory, you're going to have to make a multi-pass sort, with intermediate results stored on disk. One algorithm you might consider is the "Radix" sort, which is a multipass, order preserving sort that is well-suited for very data sets with fixed-sized keys, and has O(n) behavior.

See Knuth, Vol. 1, Sorting and Searching for a complete description. As you read Knuth, consider how you'd use disk files for the intermediate partitions.

- bloomberg sucks June 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

one more efficient sort is : merge sort.

- mrn July 13, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

one more efficient sort is : merge sort.

- mrn July 13, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

use MapReduce to distribute the sorting, then merge

- Vinay August 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Map Reduce is not a solution for this problem at all since we have a single node.

- codemonkey November 09, 2012 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More