LeetCode 417: Pacific Atlantic Water Flow — Step-by-Step Visual Trace
Medium — Graph | DFS | Matrix | Backtracking
The Problem
Find all cells in a 2D matrix where rainwater can flow to both the Pacific Ocean (left and top edges) and Atlantic Ocean (right and bottom edges), where water flows from higher or equal height ...
blog.tracelit.dev2 min read