Amazon Interview Experience | Set 179 (For SDE-1)
3) do not remember
1) Number of hops required to reach the end of an array , where the maximum hop is the value at index.
Tweaked question after this, to reach any node.
1) Project and resume discussion.
Problems faced and how you approached them.
2) A large number of emails coming into the system, at any given time find the top k issues being faced by the users. Problem reduced to find the top k trending words in a large file.
3) Implement a vector in c, using any available data structure
Started off with a lengthy discussion on current project, was asked to draw a schematic of the same, and then was asked to discuss my roles and responsibilities as well as suggest what improvements could be made to it.
1) Given a 2-D array, in which all the elements are either 0’s or 1’s, and all the rows are sorted, Give an algorithm for finding the row having the maximum number of 1’s. Was asked to code and analyse time complexity as well.
2) There is a given set of colours , say [1-N]. Now , people are coming into a stadium wearing t-shirts of any of these colors. Write an algorithm to find the first person to come in, to have worn an unique color.
The question wasn’t clear to me at first, so after a few examples , got what he was trying to ask.
For eg. Suppose we have colors R G B
and the stream of people are as,
G R B G G G G
the output should be R.
Hope this helps some people.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. Google , E-Litmus and Microsoft Test Serieses.