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.
Recommended Posts:
- Amazon Interview experience | Set 324 (For SDE2)
- Amazon Interview Experience for SDE2
- Amazon Interview Experience SDE2
- Amazon Interview Experience | Set 260 (For SDE2)
- Amazon Interview Experience | Set 154 (For SDE2)
- Amazon Interview Experience | Set 431 (For SDE2)
- Amazon Interview Experience | Set 430 (For SDE2)
- Amazon Interview Experience | Set 381 (For SDE2)
- Interview Experience of Amazon - SDE2
- Amazon Interview Experience for SDE2 (3 years exp)
- Walmart Interview Experience for SDE2 | Set 19 (3.8 years experience)
- OYO Rooms Interview Experience | Set 5 (For SDE2)
- Traveloka Interview Experience for SDE2
- Flipkart Interview Experience | Set 28 (For SDE2)
- Interview Experience for SDE2 at OneDirect
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.



