Ezvor

1197. Minimum Knight Moves

MediumBreadth-First Search Preparing judge… LeetCode
Breadth-First SearchHeuristic SearchBidirectional SearchA* Search

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.