DFS (depth-first search)
Also written: DFS, DFS flood fill
A search that follows one path as far as it can before backing up, usually written with recursion. Here it marks every cell of an island as visited.
Also written: DFS, DFS flood fill
A search that follows one path as far as it can before backing up, usually written with recursion. Here it marks every cell of an island as visited.