Today you will write some different iterator functions for traversing trees:
breadthFirst
You're an industrious programmer that lives off the grid. The local well that you use to fetch water has gone dry, so you've decided to collect rain water. Unfortunately, your collection device isn't flat.
Given n non-negative integers in an array representing an elevation map, compute how much rain water your collection device can hold. The width of each bar is 1.