Yahoo Interview Question for Software Engineer / Developers


Country: United States
Interview Type: Phone Interview




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

can you be bit more clear?

- Anonymous December 10, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For 5 billion numbers, if we want distinct numbers in sorted order we can use sortedset interface.

If its key value pair we can use sortedmap interface

- Anonymous December 13, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

sort 1000 at a time then sort those over and over again like the mergesort

- Ajit January 07, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

external sort, split it into many segments and sort them in many pass

- nim January 17, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For these kind of sorting best way is to have Map Reduce algorithm

- bhaskardas4u August 22, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

use external sort. It's primary purpose is to sort large data sets that don't fit in the main memory. Following is the excellent lecture by sahi Simpson. MIT prof

video.google.com/videoplay?docid=-978892635109400080

- Solution September 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

the video does not exist

- tarun July 23, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Counting sort for sorting 5 billion numbers, we'd need an auxiliary array occupying ~20GB space. If we don't have that much memory at hand [which we might in case of production systems] then we'd have to resort to External sort.

- Second Attempt February 17, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

map reduce cannot be used to sort. It can be used to sort if you are planning to use counting..however if there are a billion distinct numbers then this approach wont work as well..

- s September 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Why can't the reducers implement a merge algorithm like we do in case of an N-Way merge. No doubt, sorting will be much more efficient if we have dupes but for unique numbers it should work too.

- Second Attempt February 17, 2013 | 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