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 problem not available. #2166

Open
raunakbhupal opened this issue Mar 30, 2021 · 1 comment
Open

Trapping Rain Water problem not available. #2166

raunakbhupal opened this issue Mar 30, 2021 · 1 comment
Labels

Comments

@raunakbhupal
Copy link

@raunakbhupal raunakbhupal commented Mar 30, 2021

A common Google interview question known as the Trapping Rain Water problem where given an array of some non negative integers which represents the height of the block. Considering the width of each block to be 1 we need to find how much water could be trapped between the blocks during the rainy season.

  • Trapping Rain Water Problem

Test Case:

Consider an array of size 6 and the heights of blocks be {3,0,0,2,0,4}
Thus the output should be 10.
Which accounts for the total trapped water of 3+3+1+3

@stale
Copy link

@stale stale bot commented Jun 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant