Amazon Interview Question

Rain water trapping problem standard