Need help with building the logic for this problem. Should we try placing 1 at every 0 and checking the max pond size?
How to check the pond size?
Expand The Pond
hello @nachiketn
yeah u thinking in right direction.
u can place 1 at some cell and then run dfs from that partiular cell to find the pond size.
but this will not be efficent so try to optimse it furthur.
hint -> dsu
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.