Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ trapped_water.py
File
trapped_water.py
dynamic_programming/trapped_water.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"
2
Given an array of non-negative integers representing an elevation map where the width
3
of each bar is 1, this program calculates how much rainwater can be trapped.
4
Callers
nothing calls this directly
Calls
1
trapped_rainwater
Function · 0.85
Tested by
no test coverage detected