Amazon Interview Question

leetcode problem trapping rain water