Can anyone explain me how to optimize the backtracking algorithm of Knight Tour so that it passes all the testcases. Also, where can I find detailed explanations and solutions to cses problems? I found a explanataion of graph problems by some guy in codeforces but I was unable to understand what I have to sort in the knight tour.
A simple pruning that you can do is prioritizing going to adjacent spots that have less options. This should be enough, however do you want a more in depth explanation? I think you can figure out why this works