Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 913. Cat and Mouse
Two players alternate moves along edges of an undirected graph: the mouse starts at 1, the cat at 2 (cat cannot enter node 0), and the game ends if the mouse reaches hole 0 (mouse wins), the cat lands on the mouse (cat wins), or a position repeats (draw). Determine which of the three outcomes occurs under optimal play — essentially resolving a finite game-state graph (mouse, cat, turn) with cycles/draws via retrograde analysis/BFS.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late December, 2024
Mid-level
Cat and Mouse game
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.