Round 1: Coding and Problem Solving (1 hour)
- Question 1: Longest Valid Parentheses
- I initially proposed a brute-force approach, examining every possible substring for validity, which resulted in an overall complexity of O(N³). The interviewer requested a more efficient solution and provided a few hints. I then devised an O(N) solution using a stack. However, when asked to solve this problem without using additional space, I couldn’t come up with a solution using constant space.
- Question 2: Rotate Image
- I initially solved this problem using additional space equal to the size of the matrix. The interviewer then asked if it could be done in place. Despite giving it considerable thought, I couldn’t devise a constant space algorithm. Due to time constraints, the interviewer asked me to implement the solution I had provided.
Amazon Interview Experience For A SDE-2
Back in 2017, I was working at a startup that was struggling to secure its next round of funding. With financial obligations piling up, I decided it was time to move on. I reached out to a recruiter at Amazon who had been involved in my previous Amazon interview process in 2016 when I received an offer for an L3 role. Unfortunately, I found out that he had left Amazon, so I contacted a few random technical recruiters at Amazon on LinkedIn. Thankfully, one of them responded and asked about my availability for an interview. I requested at least two weeks to prepare, which he agreed to.
At that time, Amazon was actively recruiting and holding hiring events on weekends. If you were invited for an in-house interview, you had to go to their office and complete all the interview rounds in a single day. They even provided lunch for all the candidates. I fondly remember those face-to-face interactions, which have since been replaced by virtual online interviews post-COVID. I miss those in-house interviews.
Contact Us