Status: 4 YOE, Masters graduate, current role - Software Engineer, USA
Position: SDE1 at Amazon
Location: Tempe, Arizona
Date: August, 2020
In the last two months, the leetcode community has helped me enough to pass through my interviews. Posting with a sense of gratitude.
One of the HR person from Tempe location emailed me about this SDE oppurtunity by June 2020. And, I decided to give it a short as life was already unvarying - tired of making another dalgona coffee, bored of another board game, exhaused of working from home and not cherishing any usual activities.
Online Assessment
I got some new skin questions based on well known concepts -
Two sum (with few conditions on how to make the number pair).
Amazon is developing a music application to use during commute. The app would suggest two songs based on the total travel duration. The pair of songs is suggested in such a way that hearing those would help you to reach your destination at the end of the last song.
Write a program in such a way that the pair of songs suggested will always contain the song with longest play time when more than one pair of songs could be suggested.
Given input are: 1) Array integers of songs 2) Total travel duration.
Example: int[] songs : {10, 35, 40, 45, 50, 55, 60}
int travelDuration: 90
Ans: new Pair<Integer, Integer> (35,55)
Similar to finding the shortest path in a 2D map from point A to point B - Treasure Island II https://leetcode.com/discuss/interview-question/347457
Final round (Virtual)
Round 1 - With SDE 3 & SDE 1
LP - 2 questions with atleast 2 technical follow up questions on each
Coding - Best time to buy and sell Stocks I - https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
Follow up 1) If u can sell before buying - return the profitable buy and sell dates
2) Gave few testcases and asked me to explan the output
3) U can buy and sell stocks multiple times - Best time to buy and sell Stocks II - https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
4) Run time complexity?
Had some 10 mins time left in the end to disucss.
Round 2 - With TPM
Exchange of intro on each of us.
LP - 3 questions with atleast 2 follow up questions on each.
Oops Design - Design and program Alexa. For example,
Speaker Display Power BatteryEcho yes no yes no
Headphones yes no no yes
TV yes yes yes no
Phone yes yes yes yesThe response from alexa should be confined to the mentioned features when used from each of the devices.
For example, While using on Echo, alexa should control operations of echo speaker and respond questions about power status; while using on phone, alexa should perform actions on the device display & sound, and provide status on power if its connected to charge or respond battery percentage.
Spent some 25 mins, but did not have enough time to complete the implementation. Guess I would have coded only 50-60 percent of what i had in the mind. But the interviewer seemed to be satisfied with my approach and modularity.
Round 3 - With SDE 2
LP - 2 questions with atleast 2 technical follow up questions on each
Coding - Populating Next Right Pointers in Each Node on a binary tree - https://leetcode.com/problems/populating-next-right-pointers-in-each-node/
Follow up: Why BFS why not DFS?
Which of the two approches is better?
How would you do with DFS?
What data structure would you use for DFS?
Run time complexity and space complexity? ( For this scenario, the maximum space complexity will be only n/2 at any time)
Had around 10 mins to discuss about the team and projects at the end.
*Round 4 - With SDE 1
LP - 2 questions with atleast 2 technical follow up questions on each
Coding - Roman letter to Integer - https://leetcode.com/problems/roman-to-integer/ (if exceeds integer limit return Integer max)
Follow up - Multiples of 10 such as X, V, C, etc. cannot appear 4 times consecutively. If so, return -1.
Is there a way to simplify the logic?
Run time complexity?
Had more than 10 mins at the end to discuss.
Tip: If you have two or more programming languages of choice, get to know the tech stack of the interviewing team. If you can code on one of the languages that they use, the team would have another reason to consider you. And, for each round, after the LP questions, you may have 20 - 30 mins to solve a problem with follow-up questions. So, prepare your LP questions well. In end if you have time try to connect with the interviewing team.
All the best.