Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much rainwater can be trapped after raining.
Click Run to execute sample tests.