Submission code is
Submission #3238432
and logic is that for every cell we will precompute the address or index of next cell containing 0 to their right and in doing so we will traverse all these consecutive ones similarly in hand we will also be having all count of next o s from down of a particular cell so in the traversal from left to right for every cell in a row for all adgacent ones we compute the cell having minimum value of bottom index containing 0 and this minimum value is maximized for all adjacent ones positions and finally that max value is printed… PLEASE HELPPPPPPPPP ONLY ONE TEST CASE IS REMAINING
Please xheck my logic of all ones dp problem
Please ask on one thread only.
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.