1 TEST CASE IS NOT PASSING
RAT CHASES ITS CHEESE
hello @anuragavm123
rat can move in all four directions ->

but in ur code u r considering only two direction , pls correct it and then it should work
1 Like
Oh actually i have not seen that thank u
a) initialise all ur bool variable with false
b) add extra check in ur if statement to avoid invalid index
check ur updated code here->
1 Like
Thank u so much i understood my mistake