Test case #1 getting wrong answer. Please check.
Rat in a maze Test#1
Hello @zenolusx2,
Your code is not considering the testcases like:
5 4
OXOO
OOOX
OOXO
XOOO
XXOX
Your Output:
1 0 0 0
1 1 0 0
0 1 0 0
0 1 1 1
0 0 0 1
Expected Output:
-1
Hope, this would help.
Give a like, if you are satisfied.
I modified your code:
Now, it is passing all the testcases.
It was earlier giving wrong output for the testcase with 1000 rows and 1000 columns
Hope, this would help.
Give a like, if your problem is solved.