Round 1
Questions:
The first question was a variation on the trapping rainwater problem:
Trapping Rain Water
The variation asked how high to build the side walls of the grid to hold the required amount of water.
Candidate's Approach
Gave a brute force solution that passed all cases. Suggested an idea for optimization using binary search.
Interviewer's Feedback
No feedback provided.
Round 2
Questions:
The second question was about the robot in a grid problem:
Unique Paths
The interviewer asked for a recursive brute force approach after the candidate mentioned knowing the optimal solution.
Candidate's Approach
Successfully coded the recursive brute force approach and passed all cases. Stumbled on time complexity, initially stating it as O(2 ** (n x m)), while the correct answer is O(2 ** (n + m)). Used a global variable to store the result, which the interviewer noted prevented caching.
Interviewer's Feedback
No feedback provided.
Round 3
Questions:
The third round was a system design question:
Design a Parking Lot Application.
Example answer here: Design a Parking Lot Application
Candidate's Approach
The candidate felt this was their weakest round, failing to explicitly list nonfunctional requirements and only providing 2 tables: User and Parking Lot. They noted that the example interviewee provided 5-6 tables and APIs, including features like canceling the parking and payment. However, the candidate was able to discuss race conditions and locking the row from ParkingLot when a user makes a reservation, drawing from their recent study of the Ticketmaster problem.
Interviewer's Feedback
No feedback provided.