Leetcode #1488: Avoid Flood in The City
June 24, 2020
When drying lake #L, it is only useful to dry it if it is FULL already. Otherwise, it’s just a waste to dry an empty lake. (Explained this in the code with a small example as well). In short, drying a lake #L only makes sense if it is already FULL and it is going to rain on that lake in future.
Which lake to dry on a day when there is no rain, can not be determined without knowing the rain sequence that is coming next. … More Leetcode #1488: Avoid Flood in The City
