← 返回 amazon 的题目列表Trapping Rain Water Between Pillars Problem
类型:online_judge
amazon
Given a list of non-negative integers representing the height of pillars where each pillar has a width of 1. Calculate the amount of rainwater that can be trapped after raining. Example: Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6. Make reasonable assumptions about the data scale.
Example
Input
[0,1,0,2,1,0,1,3,2,1,2,1]