Yahoo Interview Report
- 0of 0 votes
AnswersHow to sort a 1000 GB file with ram size is 4 GB only. Which algorithm or data structure we need to use to sort these files?
- codemonkey November 09, 2012 in United States for Search
Follow Up: External sort is Ok... but how can you make this solution more efficient...
Follow Up 2: Ideal chunk size for external sort (I said 512 MB based on my experience with MS Word 2013, it can not load file size >512 MB)| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow would you design an Excel sheet's Data structure. You need to perform operations like addition. The excel sheet is very sparse and is used to store numbers in the range 1-65K. Index for a cell is known.
- codemonkey November 09, 2012 in United States for Search| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - -1of 1 vote
AnswersSuppose there is an array with numbers :
- codemonkey November 09, 2012 in United States for Search
1, 14, 5, k, 4, 2, 54, k, 87, 98, 3, 1, 32
Output for this can be assuming k =20
1,14,5,4,2,3,1,k,k,54,87,98,32
Now sort this array in a way all k are in middle and all values on left of k are smaller (in any order) and on right are larger (in any order)
Note: k is an integer value within range of 1 - 32768
Follow up: Sorting is ok. what sorting you want to use ? still is sorting necessary ? are there any other approaches ?
Follow up: Used External array with 2 pointers and 3 pointers approach. They wanted more efficient solution.| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm