solulubeta
Sign in
DSA Basics / Exam level
03.24 · Problem

Rain on the Uneven Roof

Hard Two pointers with running maximums Pro

This problem is part of solulu Pro

A roof is built from blocks of different heights standing side by side. When it rains, water collects in the dips — a dip holds water up to the lower of the tallest block on its left and the tallest on its right.

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

Item 89 of 90 · updated 2026-10-12