Connected Components
Everything on SkillVeris tagged Connected Components — collected across the glossary, study notes, blog, and cheat sheets.
2 resources across 1 library
Interview Questions(2)
Number of Islands Problem: How Would You Solve It?
Number of islands is solved by scanning the grid and, each time an unvisited land cell is found, running a flood-fill (DFS or BFS) that marks every orthogonall…
What is the Flood Fill Algorithm?
Flood fill is a traversal algorithm that starts at a given cell in a grid and recursively or iteratively spreads to all orthogonally (or optionally diagonally)…