Can u tell me in which case i ll get wrong ans
@shivanshmittal25
Your output is giving X’s as well in the output which are not supposed to be there. Your output should only contain 0’s and 1’s.
Input :
5 4
OXOO
OOOX
OOXO
XOOO
XXOO
Expected Output :
1 0 0 0
1 1 0 0
0 1 0 0
0 1 1 1
0 0 0 1
Your Output :
1 X 0 0
1 1 0 X
0 1 X 0
X 1 1 1
X X 0 1