Yahoo Interview questions in in Technical Round
Technical Lead Round Interview Questions and Answers
(Continued from previous question...)
Yahoo Interview questions in in Technical Round
1. How have you build the spell checker algorithm for Altertunes ?
2. From where are you playing all the mp3 files ? Are they on your server ?
3. If you have to, how will you implement the Orkutís people connection algorithm ? i.e. If User A visits User Cís profile where User C is not a direct connection of User A, then Orkut shows a possible shortest connection. Something like this User A -> User B -> User C.
4. What considerations have you taken while building the auto-suggest feature for Altertunes ?
5 Given a tree, how will you create a mirror image of the tree? What algorithm will you use? What traversal will you prefer?
6 There is a link list, which contains a closed loop in it. How will you determine that closed loop in the link list?
7 Given a few numbers, how will you push them into a stack such that whenever I pop the top most element from that stack, I get the minimum number from the bunch. Also he wanted me to tell the pop push algorithm such that the order of insertion and popping should be O(1).
8 Given two log of wood which burns completely in 1 hour each. How will you determine 45 minutes.
9. Given a HTML page, how will you represent the same in XML format ?
10. What are the advantages of Hidden Markov Model over other pattern recognition algorithms ?
11. Yahoo is organizing an online programming competition and I am the head. There will be over a few million programmers participating in this contest. I have a set of 10 programming questions with me, which I give to each programmer one by one. As the programmer submits the solutions I check it, and if found perfect I give him the next question. Who-so-ever completes the 10 programming questions first is the winner. You have to award top 10 programmers. How will you go about developing such a system ? What all precautions will you take while developing such a system ? How many CPU will be required for such a system ? How will you protect the system from going down, in cases when a programmer tries to submit a virus as a solution ? etc etc
12. Whats the probability that, my and your birthday lies on the same date and same day of the year ? (There were about 3-4 probability questions that he asked me)
13. Draw and explain the whole client-server model ?
14. Explain in detail, what all happens from the moment one submit a URL in the browser till the user sees the requested page on the browser?
15. Write algorithms for Breath First Search (BFS) and Depth First Search (DFS) ? Which one is preferred over the other and why ?
16. You have to weight all the weights between 1 and 100. Tell minimum number of weights required to do the same? (Probably the answer I gave was, weights which are a power of 2 i.e. 1,2,4,8,16,32 and 64)
17. You have to weight all the weights between 1 and 100. Tell minimum number of weights required to do the same, however in this case you can use both pans to measure a particular weight ? For eg. If we need to weight 2 Kgs we can have 3 Kg weigh on one side and a 1 Kg + 2 Kg weight on the other side. (Probably the answer I gave was, weights which are a power of 3 i.e. 1,3,9,27Ö)
18. You have a few eggs and there is a 100 level building. Determine the minimum number of attempts required to detect the floor from which, if we drop the egg it will break ? (Always consider the worst case that the egg will break at the top floor and for minimum attempts proceed from lower floor to top floor in non-uniform steps. Probably I was able to do this in 14 tries. Check if you can do the same
19. There is a huge string containing letters. Now in the string there are a lots and lots of palindromes. You need to find out the palindrome of the longest length. How will you do the same ? (Note: When I was reached the solution using stacks and queues, to complicate things he told me that a palindrome can further have a palindrome within it for eg. PALINDROMEDALADXYXDALADEMORDNILAP , hence we see the string has DALAD as a palindrome which is hidden in the full string which is a palindrome of bigger size.)
20. There is a link list which have a lot of circular loops into it. How will you find the longest loop in the link list ?
21. You have a very very large text file containing words. Consider that you canít read it fully in the memory at once. How will you go about finding a word in the text file ?
22. You have a very very large text file containing numbers. Consider that you canít read it fully in the memory at once. How will you go about arranging the numbers in ascending or descending order ?
23. A few questions on probability were discussed.
(Continued on next question...)
Other Interview Questions