MathWorks interview question

Knight traversal around chess board.