← Questions

Minimum knight moves

0
WaymoUberCodingLast asked Apr 2026

On a chess board (possibly infinite), return the fewest moves a knight needs to get from one square to another. Use BFS, and consider symmetry or bidirectional BFS to make it faster.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding