Skip to content

Commit 473a87d

Browse files
committed
Merge branch 'add/trapped_water_problem' of https://github.com/kosuri-indu/Python into add/trapped_water_problem
2 parents 20b78d5 + 9230589 commit 473a87d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: dynamic_programming/trapped_water.py

+4-4
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:
3030
return 0

0 commit comments

Comments
 (0)