KnightL on a Chessboard

  • + 3 comments

    BFS works like a charm here because in unweighted graphs BFS guarantees that the first time you visit a cell it gives the shortest path.