PhonePe, Recently Asked Online Assessments in 2026 | Rain in Rectangle

PhonePe · Question · Posted Apr 2026

Rain in Rectangle Problem Statement: There is a city represented by a n * m grid, where each cell of the grid represents a house in the city. Yes, the city has no roads. Rain gets collected on the terrace of the houses. It's raining in the city for last k days, and obviously rain happens only in rectangle shape. You have x1, y1, x2, y2 and h for each of the k days where x1, y1 represents upper-left cell ...

The full answer & interview discussion are available to premium members.

Log in Create a free account