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.