Akamai interview question

Trapping rain water (leet code hard level)