← All problemsSign in

1728. Cat and Mouse II

LeetCodeArrayMathDynamic ProgrammingGraph TheoryTopological SortMemoizationOpen on judge ↗

A game is played by a cat and a mouse named Cat and Mouse. The environment is represented by a grid of size rows x cols, where each element is a wall, floor, player (Cat, Mouse), or food. - Players are represented by the characters 'C'(Cat),'M'(Mouse). - Floors are represented by the character '.' and can be walked on. - Walls are represented by the character '#' and cannot be walked on. - Fo

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start