Cycle detection

Home > Computer Science > Algorithms and data structures > Disjoint Set Union > Cycle detection

This refers to determining if a given graph contains a cycle. The Union-Find algorithm can be used to perform cycle detection by keeping track of the parent of each vertex and checking if two vertices have the same parent during the traversal.