Pattern 22: LeetCode Interview Patterns24 sections · 736 units
Open in CourseQuiz: Detecting Redundant Edge
Test your understanding
Check Your Understanding
When processing edge [u, v], how do you know this edge creates a cycle?
- A.If u or v has more than 2 neighbors
- B.If u == v (self-loop)
- C.If the edge appears twice in the input
- D.If find(u) == find(v) before the union