Rat in Maze Problem

Where and why is this code wrong?

Code: https://ide.codingblocks.com/s/574387

You need the right most path only, so if rightpath returns true then dont check for a downpath. And the output format is not correct there should be spaces in the output grid

Please check the code now. Still one test case failed. Help me with this.

@anuragdeol2017 make maze size big enough for constraints, you are using 1 based index so you need to increase size accordingly

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.