Two test cases are failing ,only a single test case is passed

@vinaykumar4530 hey vinay your code is failing to handle this situation
3
1 0 0
0 0 1
0 0 0
your output is 1
but the output is 0
you should visit this discuss.
for the naive approach.


now ONE TEST case is not passing

@vinaykumar4530 hey vinay
8
1 1 1 0 0 0 0 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 0
1 1 1 1 0 0 0 0
0 1 1 1 0 0 0 0
0 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0
this case is also not handled
your code output is 3 but actual one is 4

so how can i rectify this?
what is the problem in this code?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.