> For the complete documentation index, see [llms.txt](https://syjohnson11.gitbook.io/leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://syjohnson11.gitbook.io/leetcode/bfs/connected-component.md).

# Connected Component

* **Connected** is usually associated with undirected graphs (two way edges): there is a **path** between every two nodes.
* **Strongly connected** is usually associated with directed graphs (one way edges): there is a **route** between every two nodes.
* **Complete graphs** are undirected graphs where there is an edge between every pair of nodes.
* **检查directed graph是否有环可以用DFS或者BFS(course schedule)**
* **检查undirected graph 是否有环可以用Union Find**
