Phone screen: This took place in , and I passed. However, I had already begun working at another company by the time they scheduled the onsite interview.
Q1: Basic Calculator: Basic Calculator II This was a simplified version involving only addition and multiplication. I solved it using constant space.
Q2: Word Break: Word Break I used bottom-up dynamic programming to solve this.
Onsite: Completed on
System Design: Design Facebook Messenger. The system would only handle messages between individuals, not groups. I was able to design the API and architecture and address several follow-up questions. However, I stumbled on a few points, which I believe contributed to the rejection.
Behavioral: These were standard behavioral questions. I only recall being asked about a time I made a mistake, my favorite project, and the worst coworker I've worked with. I could have prepared better for this section.
Coding 1: Q1: Max Sum Path: Binary Tree Maximum Path Sum Solved recursively.
Q2: Maximum Swap: Maximum Swap Solved using O(n) space. I used Java for this question, which I believe was a suboptimal choice. Managing the syntax under pressure proved more challenging than anticipated.
Coding 2: Q1: Maximum number of edges between two nodes in a binary search tree. Solved recursively. Q2: Random Pick with Weight: Random Pick with Weight Solved using O(n) space and binary search to select the appropriate city. The interviewer asked a follow-up question about using an integer instead of a long.
I received a rejection email on . The feedback was that all interviewers enjoyed speaking with me, but it was a difficult decision.