This is a straight Forward question I called the function recursively on all possible Knight moves. I am getting WA. My Code : https://ide.codingblocks.com/s/147739
Getting WA in this question
For Custom input
3
1 1 1
0 0 0
1 1 1
Expected Output: 3
Your Output: 6
You are missing out on backtracking. I suppose you have not understood the problem statement completely. Please give it another try, in case you cannot interpret it feel free to respond in this thread for further assistance.
Yes I got the question now, All test cases passed… Thanks 