One test case is not passing .Please let me know the error
Thank you so much
Rat chases the cheeze
Modified Code
initialize the variables with false;
bool right=false,down=false,up=false,left=false;
It worked but can you please tell me the reason behind this change .
if they are not initialize then they contains garbage
either true or false hence ans will be anything
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.