Not able to understand the termination criteria

I can print all possible paths, How do I print only the right most path?

First try to move right, if not possible then go down. And the moment you reach the destination, just exit from the function.

Thanks, It Worked :slight_smile: