1142. Minimum Knight Moves

Medium
Breadth-First Search

Description

Hints

Hint 1
You can simulate the movements since the limits are low.
Hint 2
Is there a search algorithm applicable to this problem?
Hint 3
Since we want the minimum number of moves, we can use Breadth First Search.

Statistics

Acceptance
42.0%
Submissions
461,239
Accepted
193,548