Given an N x N chessboard, find a sequence of moves of a knight such that the knight visits every square exactly once. If a complete tour exists, print the board showing the order of visits.
- An integer
N(size of the chessboard).
- 1 <= N <= 8
Input: N = 5
Output: A 5x5 matrix showing the order in which each cell is visited (0-indexed or 1-indexed).