Code
The highlighted line runs next. The pill shows the live values in the running call.
Recursion tree
not called yet
running now
paused, waiting on a child call
land call, finished (colour = island)
✕ returned at once (out / water / sunk)
Call stack
Grid
Rows on the left, columns on top; the outer ring is off the grid
1land
0water
0sunk (colour = island)
current dfs call
outoutside the grid