Meta interview question

chess board traversal