How to print only one possible set, pls change the code spo that it can print only one possible such solution
Hey, you can add a boolean variable and make it as false initally.When you find a path make it as true.In your function before doing anything just check if that variable is true or not.If it true simply return.
Also,to get the rightmost path, make a call to right direction first and if that variable becomes true then also return from the function.
else make call to down.
Csn you change that in code