Bloomberg Interview Question

trapping rain water, max consecutive ones III