Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trapping Rain Water #19

Open
anu-shka-k opened this issue Oct 24, 2023 · 1 comment
Open

Trapping Rain Water #19

anu-shka-k opened this issue Oct 24, 2023 · 1 comment

Comments

@anu-shka-k
Copy link
Contributor

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.

Testcases:
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.

Input: height = [4,2,0,3,2,5]
Output: 9

@anu-shka-k
Copy link
Contributor Author

anu-shka-k commented Oct 24, 2023

Hi @srushtikage , I will assign this issue to you. Please resubmit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant