Amazon SDE-1 | Bangalore | April, 2022 | Selected
- Result
- Offer
- Location
- Bangalore
- Posted
- 15 Apr 2022
Summary
I recently interviewed for an SDE-1 position at Amazon in Bangalore, undergoing several technical rounds and a Bar Raiser interview. I successfully cleared all rounds and received an offer in April 2022.
How it went
Technical Interview Round 1 (January 2022)
My first technical interview round focused primarily on Data Structures & Algorithms. I was asked to solve two well-known LeetCode problems: finding an element in a rotated sorted array and determining the lowest common ancestor in a binary tree. This round did not include any Amazon Leadership Principle (LP) questions.
Technical Interview Round 2 (January 2022)
The second technical round continued with coding challenges, alongside a behavioral question. The coding problems involved finding the median of two sorted arrays and designing a data structure that supports insert, delete, search, and getRandom operations in average O(1) time. For the behavioral segment, I was prompted to discuss a challenging problem I had solved in a previous project, detailing my approach and the resolution.
Bar Raiser Round (April 2022)
The Bar Raiser round was a comprehensive assessment combining Leadership Principle questions and a complex LeetCode problem. The LP questions probed into experiences where I had to work under a tight deadline and situations where I took a calculated risk, focusing on my decision-making process and learning outcomes. The coding problem posed was Word Ladder.
After successfully navigating through these challenging rounds, I was thrilled to receive an offer for the SDE-1 position.
Questions asked (8)
- 01
Search in Rotated Sorted Array
Data Structures & Algorithms · Medium
Open the problemGiven a sorted array that has been rotated at some pivot unknown to you beforehand, search for a given target value. If the target is found, return its index, otherwise return -1. You may assume no duplicate elements exist in the array. Your algorithm's runtime complexity must be in the order of O(log n).
- 02
Lowest Common Ancestor of a Binary Tree
Data Structures & Algorithms · Medium
Open the problemGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).”
- 03
Median of Two Sorted Arrays
Data Structures & Algorithms · Hard
Open the problemGiven two sorted arrays
nums1andnums2of sizemandnrespectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). - 04
Insert Delete GetRandom O(1)
Data Structures & Algorithms · Medium
Open the problemImplement the
RandomizedSetclass:RandomizedSet()Initializes theRandomizedSetobject.bool insert(int val)Inserts an itemvalinto the set if not present. Returnstrueif the item was not present,falseotherwise.bool remove(int val)Removes an itemvalfrom the set if present. Returnstrueif the item was present,falseotherwise.int getRandom()Returns a random element from the current set of elements (uniform probability). Implementinsert,remove, andgetRandomoperations such that each takes O(1) average time complexity. - 05
Discuss a Project Problem
Behavioral
Tell me about a challenging problem you encountered in one of your projects and how you approached solving it. What was the outcome?
- 06
Working Under Tight Deadlines
Behavioral
Tell me about a time you had to work under a tight deadline. How did you manage your time and priorities? What was the outcome?
- 07
Taking Calculated Risks
Behavioral
Describe a situation where you had to take a calculated risk. What factors did you consider? What was the outcome, and what did you learn?
- 08
Word Ladder
Data Structures & Algorithms · Hard
Open the problemA transformation sequence from word
beginWordto wordendWordusing a dictionarywordListis a sequence of wordsbeginWord -> s1 -> s2 -> ... -> sk -> endWordsuch that: Every adjacent pair of words differs by a single letter. Everysifor1 <= i <= kis inwordList.beginWorddoes not need to be inwordList. Given two words,beginWordandendWord, and a dictionarywordList, return the number of words in the shortest transformation sequence frombeginWordtoendWord, or 0 if no such sequence exists.