Gettin run time error


test case run perfectly

@711tri read problem statement carefully it is told that rat can go in any of the four directions but you are only checking for left and right direction, check all the directions for path.

i modified the code but getting segementation fault please just tell me why i am getting this fault

send me your modified code i will check it.