We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e12f1f commit 6802477Copy full SHA for 6802477
matrix/swim_in_rising_water.py
@@ -1,6 +1,7 @@
1
import heapq
2
from typing import List
3
4
+
5
def swim_in_rising_water(grid: List[List[int]]) -> int:
6
"""
7
Return the minimum time to reach the bottom right square of the grid from the top left,
@@ -57,6 +58,8 @@ def swim_in_rising_water(grid: List[List[int]]) -> int:
57
58
# Should always reach if grid is valid, but for completeness
59
raise ValueError("No path found to bottom-right (grid constraints violated)")
60
61
62
if __name__ == "__main__":
63
import doctest
64
65
doctest.testmod()
0 commit comments