AI engineering glossary · Data structures algorithms
What is connected components?
Connected components: The maximal groups of vertices in an undirected graph in which every vertex can reach every other through some path. They are found by running breadth-first or depth-first search from each unvisited vertex.
Connected components: an example
A friendship graph with two separate clusters of people who never interact has 2 connected components.
Related terms
More Data structures algorithms terms
- Consistent hashing
- Counting sort
- Cycle detection
- Data structure
- Depth-first search
- Deque
- Dijkstra's algorithm
- Directed acyclic graph
Where you learn it
Connected components is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.