Graph Theory37 sections · 1633 units
Open in CourseQuiz: Cycle Detection with DSU
Knowledge check
Check Your Understanding
You add edges one by one to an undirected graph using DSU. For edge , find(u) and find(v) return the same root. What do you conclude?
- A.Adding would create a cycle in the graph
- B.Nodes and are directly connected by an existing edge
- C.The graph has exactly connected components
- D.You need to run union by rank before checking