PayPal Interview Question

Rainwater harvesting problem. Data Structures.