Code
The highlighted line runs next. The pill shows the live values in the running call.
Recursion tree
Two forests: Pacific seeds, then Atlantic seeds · hover a call to find its cell
not called yet
running now
paused, waiting on a child
reached (Pacific search)
reached (Atlantic search)
✕ = returned at once: sea, seen or lower
Call stack
Top frame runs; the rest are paused
Island
Numbers are heights; the ring around the grid is ocean
Pacific (top, left)
Atlantic (bottom, right)
in pac
in atl
in both = answer
darker = higher
result cells in both pac and atl