Please help me with this code. I don’t know why is it not printing the output. The code is based on Warnsdorff’s algorithm for Knight’s tour problem.
The program is getting time limit exceeded. Your while(foo(arr) == false) never comes to a halt means foo is always return false value. Since you are only printing when it returns true and that never happens therefore no output.