Given a 2D array with land and water cells, find the area of the largest land-lock.
Slightly different than the usual largest island question. In this variant, the cells which don't have a transitive neighbor ending up in the ocean should be considered as land.
Soln approach.
Messed it up real bad. took the second approach (this soln was the first to come to mind, don't know why :'( ). Exited early while trying to find if a water bubble has a path to the ocean. And then didn't bother to maintain a separate state for visited cells which had a path to water. so the whole flow got messed up. shouldn't have followed exit early policy on finding a path to the ocea, then the soln would have worked perfectly. I've solved 800 Qs ot LC, ~500 medium ~200hard. never expected to mess up this bad. not my day :'(
Good luck guys!