RAT CHASES ITS CHEESE

1 TEST CASE IS NOT PASSING

hello @anuragavm123

rat can move in all four directions ->
image

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

https://ide.codingblocks.com/s/350989 THEN ALSO NOT ABLE TO PASS TEST CASE

@anuragavm123

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