Skip to content
We areTOP 1%

Cat and Mouse

HardLeetCodeGame Theory
Solve on LeetCode(opens in a new tab)
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews
Approach hintTry it first, then reveal

Label states (mouse, cat, turn) backwards from the terminal ones with a BFS. A state is won by the mover if some move reaches a state they win, and lost once every move is known to lose; unlabelled states are draws.

More in Game Theory

Game Theory questions
#ProblemPlatformDifficultyOpen1st1st Visit2nd2nd VisitRevRevise
1Stone Game IIILeetCodeHard Solve Stone Game III on LeetCode (opens in a new tab)
21-2-K GameCodeforcesMedium 1700Solve 1-2-K Game on Codeforces (opens in a new tab)
3Stoned GameCodeforcesHard 1800Solve Stoned Game on Codeforces (opens in a new tab)
4A Lot of GamesCodeforcesHard 1900Solve A Lot of Games on Codeforces (opens in a new tab)
5GameGameCodeforcesHard 1900Solve GameGame on Codeforces (opens in a new tab)
6Tree TagCodeforcesHard 1900Solve Tree Tag on Codeforces (opens in a new tab)
7Cat and MouseLeetCodeHard Solve Cat and Mouse on LeetCode (opens in a new tab)
8Not a Nim ProblemCodeforcesHard 2100Solve Not a Nim Problem on Codeforces (opens in a new tab)
9Lieges of LegendreCodeforcesHard 2200Solve Lieges of Legendre on Codeforces (opens in a new tab)

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account