I am getting partial marks in this problem , any hint what am i missing . Any edge case ?
Here is my code : (backtracking)
I am getting partial marks in this problem , any hint what am i missing . Any edge case ?
Here is my code : (backtracking)
the problem that is happening here is that u are removing the visited index from the set by erasing it
but still u use backtrack in that backtrack u need to put that set of coordinates back again
like it means u can visit again
try adding those coordinates again when u do the backtrack condition
my version of the code
but i really like the way u have utilised sets