Phone screen: Took this back in 2023 and passed but had already started working at amazon by the time they scheduled the onsite.
Q1: Basic calculator: https://leetcode.com/problems/basic-calculator-ii/description/
This was an easier version with only addition and multiplication. Solved it with constant space.
Q2: Wordbreak: https://leetcode.com/problems/word-break/description/
I used bottom up DP to solve this.
Onsite: Completed this on 11/21
System design: Design Facebook messenger. There'd only be messages between individuals, no groups.
Was able to write the API and design and a few deep dives, but stumbled on a few things. Think this is why I didn't get an offer.
Behavioral: Standard behavioral questions. I nly remember are a time you made a mistake, your favorite project, and worst co-worker you've worked with. Could have prepared better for this.
Coding 1:
Q1:Max sum path: https://leetcode.com/problems/binary-tree-maximum-path-sum/submissions/1066899714/
Solved it recursively
Q2: Maximum sawp: https://leetcode.com/problems/maximum-swap/description/
Solved it with n space. I used java for this question which I feel like was a bad idea. Getting syntax right under pressue was harder than I would have thought.
Coding 2:
Q1: Maximum number of edges between two nodes in a binary search tree. Can't find it on leetcode.
Solved recursively.
Q2: pick random citizen of a city: https://leetcode.com/problems/random-pick-with-weight/description/
Solved with n space and used binary search to select the proper city. He asked a follow up question about using an int rather than a long
Recievied rejection email today(12/4). No feedback other than all of the interviewers enjoyed speaking with me and it was a tough decision.