About This Pattern
Master the DFS/BFS (Reverse) pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.
Medium (1)
Pacific Atlantic Water Flow
Find cells where water can reach both Pacific and Atlantic oceans.
Key Signals:
Work backwards from oceansTwo separate DFSFind intersection