board is an n by n grid. Squares are numbered 1 to n * n in a zig-zag that starts at the bottom-left: the bottom row runs left to right, the row above it runs right to left, and so on. A cell holds -1 for an ordinary square, or the number of the square a snake or ladder sends you to.
You start on square 1. Each turn you roll any value from 1 to 6 (you choose it) and move forward that many squares, if that does not go past square n * n. If you land on a square with a snake or ladder, you must take it, and you take only that one: where it ends does not start another jump. Return the fewest turns to reach square n * n, or -1.