Round 1 ( Coding Round + MCQs ):
Platform : Hackerearth
- Maximum 0 flipping subarray
- Find a tour that visits all stations
The test cases were very weak and any brute force solution got accepted.
20 MCQs based on OS, DBMS. The questions were very similar to those present on Geeksquiz.
Round 2 ( Telephonic Interview 1, duration – 1 hour) :
Round 3 ( Telephonic Interview 2, duration – 35 mins ) :
After this round I was invited for onsite interviews at Amazon Bangalore Office.
Round 4 : ( F2F , duration – 45 mins )
- Relative Sorting
This question can be easily solved using a custom compare function combined with merge sort, I figured this out later on . I had proposed a different solution based on 2 hashmaps. Time complexity was O( n log n ). My approach was a little complex and lengthy, so the interviewer did not ask me to code this.
- Reverse a linked list.
He asked me to dry run my code and checked all corner cases.
Round 5 : ( F2F, duration – 1 hour, 2 interviewers )
- Design LRU Cache.
I designed it using unordered_map and doubly linked list. I coded my own DLL class. After that they framed different test cases and asked me to explain how my code was handling those cases.
They asked some questions about how hashmap is implemented.
- You are given a string and 2 operators ( & , | ). Return the total number of ways in which you can evaluate to true using the given string and operator set.
Example : Input : TF Output : 1 Input : TFF Output : 2 ( T | F & F , T | F | F )
I solved it using parenthesization and memoization. Time Complexity – O ( n3 ).
I used a 3-D array to memoize.
dp[i][j] : Number of ways to form 0 using substring( i, j )
dp[i][j] : Number of ways to form 1 using substring( i, j )
Interviewer stressed to use only a single 2-D array so I had to include the following precomputation to calculate the total number of ways to parenthesize a string of length n, lets say F( n ).
F( n ) = 1 + summation ( F( i ) * F ( n – i ) ) i varies from 1 to n-1 .
Round 6 ( F2F, duration – 45 mins )
Interviewer warned me to inform him in case I had already encountered any of these questions.
- Minimum steps to reach a destination. I told him that I had already solved this question using BFS. He asked me to explain the approach, but did not ask to code.
- Minimum number of jumps to reach the end of an array
- Construct a Maximum Sum Linked List out of two Sorted Linked Lists having some Common nodes
He was expecting an O ( n ) solution. I solved it using 2 pointer approach. He asked me to dry run my code and handle cases when array values are negative or zero.
I told him that this is a classical problem and I have solved it earlier. Told him the approach and handled all corner cases.
Round 7 ( F2F, 2 interviewers, duration – 30 mins ):
Detailed discussion about my project. Some random questions about the technologies I had used.
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.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)
- Amazon Interview Experience | Set 248 (4.8 Yrs Experience for SDE II)
- Amazon Interview Experience | Set 391 (SDE-2, 5.5 years Experience)
- Amazon Interview Experience SDE-1 | Amazon-WOW 2020
- Amazon SDE-1 Interview Experience | Amazon WOW-2020
- Amazon Interview Experience for SDE-1 | Amazon-WOW 2020
- Amazon Interview Experience | 401 (3+Years Experience for SDE II)
- Amazon Interview Experience (For Experience - 2.8 yrs) | SDE 1
- Amazon Interview Experience (SDE-1, 8 month experience, Refferal)
- Amazon Interview Experience | Set 189 (For SDE-1)
- Amazon Interview experience | Set 126 (For SDE-1)
- Amazon interview Experience | Set 129 (For SDE 1 Off-Campus)
- Amazon interview Experience | Set 132 (For SDE Intern)
- Amazon interview Experience | Set 134 (Off-Campus for SDE)
- Amazon interview Experience | Set 135 (On-Campus for SDE)
- Amazon interview Experience | Set 136 (For SDE-T)
- Amazon interview Experience | Set 137 (Assessment test for SDE)
- Amazon interview Experience | Set 138 (For SDE 1)
- Amazon interview Experience | Set 140 (Experienced for SDE)
- Amazon interview Experience | Set 142 (Off-Campus for SDE-1)