SDE2 interview offered SDE1
All rounds after OA had 30 min of leader ship principles, Some of them were overlapping which was frustrating some interviwere understood and gave a new LP question.
Online Assesment
Both questions from the list.
Most of the times you get questions from the Amazon OA list on leetcode.
Got a call from HR for setting up one hour phone interview as next round. This was new from me since I had rarely read about an hour of phone interview followed by OA on leetcode interview discussions and people around me.
Phone Interview
Interviewer was an experienced guy who had worked at google and amazon.
Spent 20-30 min on leader ship principles
Explained me a game similar to candy crush and asked me to design it.
Main points of discussion
- Design class and methods.
- Function to evaluate the next step of the player.
- Design initial matrix popultion logic, had a lot of discussion on how the matrix should be populated.
- I offered a randomized approach, talked about what will make game unsolvable and approaches to populate a simplified matrix that is solvable.
Got a HR call to setup a final round after a month, including 4 rounds with three 15 min and one 30 min break.
Round 1
- Spent 30 min on Leadership principles, general overview.
- Asked binary search and its working
- Asked to derive its time complexity using mathematics
- Asked to code for finding a key in a sorted array when the size of array is unknown. I explained my approach using IndexOutOfBound exception and try catch, coded and gave a dry run.
- I was worried about this round since I had not seen this question and came with index out of bound logic on spot and was a bit slow in writting, re writting and optimizing code.
Round 2
- I think this was bar raiser, the person had over 7 years experience.
- This was OOP design interview
- Asked to design a ticker system
- Asked to design a system diagram using shared whiteboard, i designed it as if it was sys architect question.
- Followed by classes and functions and logic
- Stresses on purchase and update logic of tickets
- I used filter design patter, criteria desgin patter, sql queries
- Talked about atomicity and why there wont be any race condition
- Talked about scaling and using sql and no sql in combination
Round 3
- This was System Architect question
- Asked to design API rate limiter, this question can be found online easily
- Focus was on logic of API rate limiter (sliding window)
- I feel I over optimized it and interviewer was genreally saying this is not needed, like round robin instead of optimized hashing.
- I feel I tried to show all my knowledge at a single place when it was not needed.
- I fell i could have done this round better had I been structured, calm and just state the basic and let interviwer ask for optimizations.
Round 4
- Given a list of boxes in a warehouse where a box can have several boxes nested or an item. A box can be empty or can have an item. Find items which are greater than given weight.
- Looking at the question it seemed straight forward, but there was no structure of how input was given. I had to discuss a lot with interviewer and decide various ways input can be recieved. Finally decided that input can be in jason format and I wrote a function to parse jason and store it in various classes like box, item where box class can have a list of boxes or an item.
- After input was all sorted out, it was simple BFS
- Interviewer expaned the question to include various other attributes of item on which filtering can be done. so I used Filter Design patter and wrote custom filters for various attributes like type of item, size, weight , color and also And and Or criteria for more than one attribute.
- Interviewer was satisfied by the design pattern.
Got a call after 1 week that I had not qualified for SDE2 but they wanted to offer SDE1.
I see this as a general trend where SDE2 are being offered SDE1.
I could have done a little better in System Architect quesiton but I am not sure that would have made any difference. I know a lot of people with same SDE1 offer while they interviewed for SDE2. I just feel SDE1 preparation is a little easy given you dont have to prepare for OOP and Sys Architect.
Below are some resources that I found extremly useful. I am sure these are posted in some older posts but still.
https://www.principle.cards/
https://www.tutorialspoint.com/design_pattern
https://medium.com/@vasanths294/permutation-combination-subset-time-complexity-eca924e00071
https://www.codekarle.com/system-design/Amazon-system-design.html
Leadership principles are very important, it is extreamly important to have all of them ready with 1,2 examples so that you dont waste time on LP in real interview. Time is precious, utilize it wisely.
Hope this helps.
Leetcode is as good as its community :)
edit:
Not a team/location specific hire. One can choose preferred location and team after interview. Going through that process.