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
41.7%
Submissions
446,463
Accepted
185,978