Getting wrong answer in robot collect points


is my code llink which on submission is giving run-error

@Adarshrajpandey You cannot assign a value INT_MIN to ans in global declaration. Declare ans in global and assign value INTMIN in main function.

stil not getting the correct answer

ans why can’t we declare INT_MIN to ans in global??

please the new code https://ide.codingblocks.com/s/194640

@Adarshrajpandey You are sending a copy of the maze in each solve function call. Pass it by reference to get the correct solution.

how to do it sir please do it as i don’t know how to do it ??

and sir why are we doing it sir bcz i m declaring it globally

@Adarshrajpandey Just put an & sign in front of the maze array as a parameter. For more information just Google pass by reference. You’ll understand a lot from this.

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.