Problem - Trapping Rain Water

Tags: monotonic stack prefix and suffix


Problem Statement:

Intuition:

Code: