Skip to content

Commit 9230589

Browse files
kosuri-inducclauss
andauthored
Update dynamic_programming/trapped_water.py
Co-authored-by: Christian Clauss <[email protected]>
1 parent d684771 commit 9230589

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dynamic_programming/trapped_water.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def trapped_rainwater(height: list[int]) -> int:
2121
on both sides for each bar, and then computing the trapped water above each bar.
2222
The function returns the total trapped water.
2323
24-
trapped_rainwater([0,1,0,2,1,0,1,3,2,1,2,1])
25-
>>> 6
26-
trapped_rainwater([7,1,5,3,6,4])
27-
>>> 9
24+
>>> trapped_rainwater([0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1])
25+
6
26+
>>> trapped_rainwater([7, 1, 5, 3, 6, 4])
27+
9
2828
"""
2929
if not height or height == []:
3030
return 0

0 commit comments

Comments
 (0)