← Intuit questions
CodingReported in a candidate post, Aug 2024

Minimum steps for a knight to reach a target

Filed under Intuit

On an n x n chessboard, given a knight's source and destination squares, return the minimum number of knight moves needed to reach the destination, or -1 if it is unreachable.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Intuit questions

Collected from public candidate posts and coding forums. Updated Nov 2026.