Hello everyone,
Semi-new grad here and just had my 3hr virtual onsite for Amazon a couple days ago.
Round 1: I believe this was with the hiring manager. Asked two different LP questions which I answered I believe pretty well with STAR format stories. He seemed happy with the answers.
We moved onto designing a search API function to search for files in a specific directory and sort alphabetically, by size, etc. Wrote decent amount of code for that but spent a lot of time talking about the edge cases and best ways to design it for the user. Felt like he was pretty happy with my answers and asked him ab his role at the end, and he was enthusiastic to tell me. We ran out of time though and he mentioned that he would love to tell me more about it later if I join Amazon, which gave me a little bit of hope lol.
Round 2: I believe this was the bar raiser round. He mentioned that he has 19 YOE with Amazon. We first went over a couple LP questions which he also seemed pretty happy with my answers and liked that I took initiative.
Then he gave me a problem that I believe destroyed my chances lol. The problem stated that a robot starts at (0, 0) of a matrix. You are given a list of items the robot needs to collect, and O(1) helper functions where given an item, it will return a list of all the coordinate locations that item is at.
The problems goal was to find the most efficient path the robot could travel to grab all the items it needs in the matrix. He wanted me to first give all the possible ideas I had for a solution.
I mentioned backtracking brute force try all ordering of paths to find the most efficient one. I then explained that I knew it had to do smth with connecting coordinates as nodes and finding the most efficient order to visit the nodes in with least cost.
That’s when it clicked and I realized this was the damn NP-Hard traveling salesman problem disguised. I kept on trying to think of how to solve it efficiently with a graph, but he finally suggested for me to just go ahead and implement the backtracking solution. I believe I implemented the O(n!) permutations backtracking solution correctly and talked through it, but I think he was definitely wanting something not so brute force.
I didn’t feel as good after being done with this round.
Round 3: This final interview was with a SDE 2 who I got along with well. We went over LP questions for a few and then jumped into a medium level tree problem which I solved with an O(n) recursive solution. We then traced through a dry run together, and he was happy with the solution.
We then had some time and had good chat at the end talking about what he liked at Amazon and other various things. Seemed like a really good round.
Status: Rejected, just got the rejection email today
Honestly, I believe that the 2nd round is what really destroyed me.
I did some research and the robot question was essentially a disguised harder version of Leetcode 847 (Shortest path visiting all nodes), which is a LC hard to solve the TSP with DP and bitmask states to get an efficient exponential solution. I know that I can always perform better, but I feel like it is kinda wild to give an NP-Hard problem for a SDE 1 interview and expect to find a more efficient optimization. I feel like many seniors would greatly struggle with this problem.
Sorry for the long post just wanted to vent a bit. I really tried studying hard for this interview and felt prepared, so I guess that’s why I’m just a little more down about the result of it.
Wishing better luck to the rest of you guys with an upcoming interview. Please feel free to ask me any questions if you’d like too.