[Leetcode] 42.Trappling Rainbow Water
빗물 트래핑 - 문제 : 높이를 입력받아 비 온 후 얼마나 많은 물이 쌓일 수 있는지 계산하라. https://leetcode.com/problems/trapping-rain-water/ Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Example 1: Input: height = [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 Explanation: The above elevation map (black section) is represented by array [0,1,0,2,..
2021. 6. 17.
최근댓글