MilindGupta-Creator / Competitive-Coding-Section

Create sections labbled further in issue section
MIT License
21 stars 72 forks source link

Trapping Rain Water #68

Closed apimpulse closed 1 year ago

apimpulse commented 1 year ago

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.

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,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped.

MilindGupta-Creator commented 1 year ago

Great. Kindly star the repository if you haven't done till now.

MilindGupta-Creator commented 1 year ago

Great. Kindly star the repository if you haven't done till now.