Getty Images Interview Question

write the code for "Trapping Water" from LeetCode