Open In App

Amazon Interview Experience for SDE-II

Last Updated : 19 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Back in 2017, I was working at a startup, and things were not going well. We were unsure if the company could secure the next round of funding. Due to numerous financial obligations, I decided to move on.

I contacted a recruiter at Amazon who had been part of my previous Amazon interview process in 2016 (when I received an offer for an L3 role). I got to know that he left his job at Amazon. So, I reached out to a few random technical recruiters of Amazon I found on LinkedIn. Fortunately, one of them responded. When he inquired about my availability for an interview, I requested at least 2 weeks to prepare, which he agreed to.

Back then, Amazon was actively recruiting, and conducting hiring events on weekends. If you received an invitation for an in-house interview, you had to go to their office and complete all the interview rounds in a single day. They used to provide lunch to all the candidates. Those face-to-face interactions were enjoyable, and I find myself reminiscing about them, especially since they were replaced by virtual online interviews post-COVID. I miss those in-house interviews.

My preparation:

In 2017, with just two weeks before my interview, I reconnected with Data Structures and Algorithms (DSA). I kicked off my prep by tackling recently asked Amazon interview questions.

Recognizing that each round of an Amazon interview delves into 1 or 2 Amazon Leadership Principles, I made sure to integrate them into my preparation.

Admittedly, I wasn’t aware of system design resources back then. I caught up by delving into Amazon’s system design interview questions from GFG and Leetcode, discussing them with mentors and friends.

I’ve also compiled notes to articulate my projects and highlight compelling situations from my career. This preparation has equipped me for situational-based questions related to Amazon Leadership Principles.

Gave a few mock interviews.

Screening round:

The recruiter provided a HackerEarth link containing three coding questions to be solved within 1.5 hours. If you’re acquainted with platforms like HackerEarth and HackerRank, you’ll be familiar with the types of problems typically presented in screening rounds. It’s crucial to solve the problems within the specified time limit and ensure that all test cases pass.

I was able to solve all the problems in time.

After 2 days recruiter sent an email inviting me for an onsite interview at the Bagmane office in Bengaluru.

Round 1 Coding and Problem-solving (1 hour)

Question 1: Longest Valid Parentheses

I contemplated employing a stack and was familiar with the method of validating parentheses expressions (pushing an opening bracket and popping on encountering a closing bracket, ensuring an empty stack signifies a valid expression). Initially, I proposed a brute-force approach, examining every possible substring (N² substrings) for validity, resulting in an overall complexity of O(N³).

Upon the interviewer’s request for a more efficient solution and the provision of a few hints, I successfully devised an O(N) solution using a stack. The concept closely resembled the one employed to verify whether a string constitutes a valid parentheses expression or not.

The interviewer asked he we could solve this problem without using additional space. I provided a few ideas but could not provide a solution using constant space.

Question 2: Rotate image

In this problem, I was able to use additional space of the same size as a matrix. The interviewer asked if we could solve this problem in place. I gave enough thought but was unable to devise a constant space algorithm. Due to time constraints, the interviewer asked me to implement the solution I provided.

Round 2 Coding and DSA (1 hour)

Question 1: Construct Binary Tree from Preorder and Inorder Traversal

It started with a straightforward question: could we recover a binary tree if we have the in-order traversal data? Subsequently, we explored the possibility of reconstructing a binary tree with either pre-order or post-order data.

I emphasized that to recreate a general binary tree, we need in-order traversal along with either post-order or pre-order traversal. Although I had a foundational knowledge of this problem from my college studies, I successfully implemented the solution during the interview.

Question 2: Partition List

This was an interesting question on LinkedList. After working through multiple examples. I was able to provide a working solution to this problem. I quickly converted my solution into a working code after verifying my solution with the interviewer.

Round 3 System design (1 hour)

Question: Design Uber

The interview involved an in-depth discussion of a scenario where cab demand suddenly increases from a particular location. We also covered Low-level design by talking about API architecture and database schema for an Uber-like platform. I had a productive conversation about potential solutions for designing a ridesharing service, including aspects such as load balancing, scalability, and availability. Overall, the open-ended nature of the discussion enabled me to showcase my technical skills and knowledge in building distributed, high-traffic systems.

Round 4 Bar raiser Coding and Low-level design.

Question 1: Minimum window substring

I started with a basic solution, thinking the problem was easy. But as the interviewer gave more examples, I realized it’s not that simple. I figured out we needed to use a sliding window approach to solve it, but my first attempts missed some cases. It took me a bit, but I finally found a solution that works for everything. Then the interviewer asked me to write the code.

After this only 20 minutes left 🙂

Question 2: LRU Cache

I shared my approach to implementing the LRU cache, aiming for modularity by using Interfaces and Generics to make it adaptable for any Key and Value types. The interviewer was helpful and granted an extra 10 minutes. I managed to write the code, although there were a few issues that I fixed after the interviewer pointed them out.

Round 5 Hiring manager

This round felt more like a casual conversation than a formal interview. The interviewer inquired about my interests, past experiences, and notable projects I’ve been involved in. Following that, there were about three situational questions aimed at addressing Amazon’s leadership principles.

The questions delved into scenarios such as conflicts with a manager and how I prioritize tasks between operational excellence and business requirements.

Offer:

In just a few days, the recruiter called to extend congratulations on my success in the Amazon interview. I received favourable ratings, with 2 strong hires and 3 hires. Considering competing offers from a startup and PhonePe, I shared the details with the recruiter. Based on this information, the recruiter presented an initial offer that appealed to me, leading to my acceptance of the offer. Consequently, I joined Amazon as an SDE-2.

The entire process, from the screening round to the final offer, was remarkably swift, and completed in just two weeks. The Amazon recruiter demonstrated great support and maintained an impressive pace throughout the interview process.

Key takeaways

  • Amazon interviews: Aim to solve 2 problems within the 1-hour timeframe.
  • Leadership principles: Interviewers keenly observe and assess your alignment with Amazon’s leadership principles during both technical problem-solving and general conversation.
  • Flexibility in timing: Amazon interviewers may offer additional time if you’re on the right track, but this can vary between different interviewers.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads