solulubeta
Sign in
NeetCode 150 / Two Pointers
02.05 · Problem

Trapping Rain Water

Hard Two pointers with running maxima 1 video LC 42 Pro

This problem is part of solulu Pro

height[i] is the height of a bar of width 1. After it rains, water collects between taller bars. Return the total units of water trapped.

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 14 of 150 · updated 2026-10-12