Prior Experience: 2.5 Years at Service based company
Position: SDE 1 at Amazon
Location: Bangalore, India
Date of Offer: March 22nd 2022
Date of Application: Oct 14th 2021 (Yup it took 5 months)
Online Assessment:
Date: Oct 21st 2021
Coding challenge (2 scenarios) and Coding approach (elaborate why you code the way you do) - 105 minutes
Work style survey - 15 minutes
Feedback survey - 5 minutes
Coding Question 1: https://leetcode.com/problems/reorder-data-in-log-files/
Solution: Used a custom comparator to solve this
Coding Question 2:
/* Give a computer with total K memory space, and an array of foreground tasks and background tasks
the computer needs to do. Write an algorithm to find a pair of tasks such which give the most optimal memory usage, Here the most optimal indicates the maximum memory usage. If the deviceCapacity is 10MB and there exists a pair with 9MB then that is most optimal pair if there exists no other pair with 10MB usage
/*
**Input **
DeviceCapacity, an integer representing the maximum capacity of the given device;
ForegroundAppList, a list of pairs of integers where the first integer represents the unique ID of a foreground application and the second integer represents the amount of memory required by this application.
BackgroundAppList, a list of pairs of integers where the first integer represents the unique ID of a foreground application and the second integer represents the amount of memory required by this application.
**Example:**
deviceCapacity = 7
foregroundAppLIst = [[1,2], [2,4], [3,6]]
backgroundAppList = [[1,2]]
Output : [[2,1]]
Explanation : The memory usage closest to 7 will be (4 + 2) and there are no other 6 mem usage pairs so we return the id's [[2,1]]
deviceCapacity = 7
foregroundAppLIst = [[1,2], [2,4], [3,6],[4,5],[5,5],[6,5]]
backgroundAppList = [[1,2]]
Output: [[4,1],[5,1].[6,1]]Solution: Used two pointers
Experience: Was able to solve this pretty easily since I practiced these questions before.
Round One - SDE 2
Date: Nov 29th 2021
Coding DS and Algo - 45 minutes
Coding Question 1:
/* Given an input of integer N return all the special numbers starting from 1 upto n(inclusive)
A special number is a number in which each digit has the difference of exactly 1 with it's neighbors such as
121, 123, 343, 345 etc.
Example:
Input: 150
Output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 21, 203, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 101, 121, 123]
*/Solution: 1 - 9 are all special digits and using them a BFS algorithm to get the next special number. you can get 121 and 123 from 12
Experience: I could not get to the pattern and kept thinking if there was a greedy way of solving this. Got too many hints to finally figure it out. Once I could figure It out I was able to code up the solution.
Coding Question 2: https://leetcode.com/problems/container-with-most-water/
Solution: Two pointers
Experience: Completed the optimized solution in 5 mins
Overall Round 1 did not go well as I took too much time and hints for the first question, also I was nervous since this was my first round
Round Two - SDE 2
Date: Dec 5th 2021
CSF and Problem Solving - 45 minutes
Coding Question 1: https://leetcode.com/problems/next-permutation/
Solution: Two pointers
Experience: Solved this question using two pointers and gave the optimized TC and SC
Coding Question 2: https://leetcode.com/problems/decode-ways/
Solution: Recursion with Memoization
Experience: Was able to solve this and gave the optimized TC and SC
Computer Science Fundamentals : Asked questions related to Garbage Collection, OOP, Database Indexing, Microservices and other stuff present in the resume
Overall Round 2 went extremely well as I was able to explain the optimized solution and answer majority of the CSF questions
Note: No communication after this round for like a month and a half, I thought I was rejected and had applied to another amazon application for which I gave two rounds (Questions below), even though I did well in those rounds they cancelled that application since this was "Under Consideration"
Round 1 : https://leetcode.com/problems/boats-to-save-people/ & https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/
Round 2 : https://leetcode.com/problems/intersection-of-two-linked-lists/ & (Find the maximum node values between any two given nodes of a BST)
Round Three: Bar Raiser - SDE 3
Date: Feb 1st 2022
Design and LP - 60 minutes
Design LLD: A Toll Booth Ticket price calculator. You could have two types of roads(one way, two way), three types of payments(upi, cash, card), and discounts(20% off on card, 100 rs cashback on upi) needed to design this in a maintainable fashion. After the Initial design I came up with he asked to breifly explain how I would tackle surge pricing if I had to implement.
Leadership Principles: Dive Deep and Ownership related questions
Overall Round 3 went extremely well as I was able to give a good design and talk about my past experiences
Round Four - SDE 2
Date: March 9th 2022 (I think you get the point by now lol)
Coding DS and Algo and Leadership Principles - 60 minutes
They gave me an additional round since I did not perform well in the first round.
Interviewer joined 10 mins late
Leadership Principle: Learn and Be Curious related questions.
Coding Question 1: https://leetcode.com/problems/rotting-oranges/ but changed the scenario to covid
Solution: BFS
Experience: Was able to solve this very quickly and give optimized TC and SC
Coding Question 2: https://leetcode.com/problems/distinct-subsequences/
Solution: DP
Experience: Since we had very little time as the interviewer joined late. I gave the brute force solution and implemented it as requested by the interviewer
Overall Round 4 went well apart from the last question
Final Thoughts: Amazon is very slow with their interview process and this could be a nice thing and frustrating as well since you have time to revise and also the stress of no communication in between rounds. This happened to alot of people but also alot of them had their interviews done quickly as well I think it depends on your recruiter and the requirement.
Leetcode's premium lists did help me alot as majority of the questions asked were from that list. LP are important so have two stories prepared for each LP of Amazon.
Compensation Details: https://leetcode.com/discuss/compensation/1872986/Amazon-or-SDE-or-Bangalore