Rat in a maze (implementation)

code link:- https://ide.geeksforgeeks.org/PLF8YvtuuS

does not give correct input output