RainWater-Trap-LeetCode
Here is the famous leetcode problem of Rainwater trap
Basic idea of this problem
Water can only be filled if the other two blocks are higher than the between blocks
So will fil find the higher blocks from both the ends i.e. Right and Left
After finding them we will store them in the array respectively.
Then we will find out the minimum of the two because if we take higher building the water will overflow.