how to print only rightmost path ,
in my code i can print all the paths but tell how to print only rightmost path.
Rat in a Maze (Backtracking)
for only rightmost path
you go for right and if it print the solution(means return true) then you have to stop calling further recursive call
if right call returns true means one solution is printed now just return true
but if it returns false then call further
modified code