Millennium Interview Question

Pretty basic leetcode question, variation of trapping rain water