Amazon SDE-2 interview experience

Just attended a lateral hiring for Senior Development Engineer, Amazon at Amazon, Gurgaon. Was asked the following questions.

Round 1

Q1 Find the max of each window of size k in a given array.
Q2. Given an even length expression consisting only of ‘{‘ and }’, find the min. number of edits needed to make it a valid balanced expression.

Round 2

Q1. Given a text and a search string, find the shortest substring of the text containing the anagram of the search string.
i/p : text – abcdbabcba, search string – abb
o/p: abcb

Q2. Given a map that maps two integers such that the key is the source level, and value is the max level reachable from the source level, find the min. steps needed to reach the last level beginning from the first level.
eg: i/p: 1->4, 2->3, 3->6, 4->5, 5->8, 6->7, 7->8, 8->-1 (-1 indicates that last level has been reached).
o/p : 3 [1->4, 4->5, 5->8 = 3 steps]

Q3. Given a list/ array of sentences (consisting of alphabetical words), print the sentence(s) that has/have at least as many consonents as it has vowels, and which contains the word that occurs most frequently amongst all the given sentences.



Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.