Round 1
Questions: I was asked a dynamic programming question in the form of a complex story involving a game between Alice and Bob. It was a variation of the frog jump problem on Leetcode, but it was not straightforward.
Candidate's Approach
- Initially took time to understand the question and asked several clarifying questions.
- Came up with a recursive approach for the problem.
- Suggested using dynamic programming (DP) memoization for optimization.
- Faced confusion regarding which states to memoize.
- Started coding and initially missed the turn-taking aspect of the jumps, which required a change in the code.
- Ultimately wrote clean code with both brute force and optimal solutions.
Interviewer's Feedback
The interviewer was pleased with the clean code and the ability to optimize the solution effectively.