417. Pacific Atlantic Water Flow
class Solution: def pacificAtlantic(self, heights: List[List[int]]) -> List[List[int]]: def dfs(q, a): while q: y, x, cur_height = q.popleft() for ny, nx in [(y, x + 1), (y, x - 1), (y + 1, x), (y - 1, x)]: if not (0
2025.10.05