Solution to Flood-Depth by codility

25 Sep


Question Name: Flood-Depth or FloodDepth

This is a variant of Trapping Rain Water by LeetCode. The undergoing concept is the same. However, the implementation is a bit different.

One thought on “Solution to Flood-Depth by codility

  1. I just want to point out that there is actually an O(N) time, O(1) space solution by using two pointers.

Leave a Reply

Your email address will not be published. Required fields are marked *