BNSF Railway interview question

maximum rain water trapped (leetcode hard)