feat: trapping rain water problem done
This commit is contained in:
@@ -25,3 +25,17 @@ def test_find_missing():
|
||||
result = find_missing(input)
|
||||
expected = 4
|
||||
assert result == expected
|
||||
|
||||
def test_rain_watter():
|
||||
input = [3,0,1,0,4,0,2]
|
||||
expected = 10
|
||||
result = trap_rain_water(input)
|
||||
assert result == expected
|
||||
input = [3,0,2,0,4]
|
||||
expected = 7
|
||||
result = trap_rain_water(input)
|
||||
assert result == expected
|
||||
input = [1,2,3,4]
|
||||
expected = 0
|
||||
result = trap_rain_water(input)
|
||||
assert result == expected
|
||||
|
||||
Reference in New Issue
Block a user