I used recursion to solve this problem. and it gives the solution to the test cases given in the problem perfectly. But i m getting WA .
can anyone tell me what's wrong with my code.
Code:
[cpp]
Code has been removed.
[/cpp]
I m getting Wa in this problem . I used BFS to solve this Problem and it works for all the Sample Cases and Inputs I have made. Is There any Bad inputs for This Problem ??.
If so, PLZ help me !!.
Some Inputs with Outputs will be better for me to check my fault.