Problems / Graphs / Redundant Connection
#92 Medium Time O(n·α(n)) Space O(n) Animated

Redundant Connection

Find and return the redundant edge that creates a cycle.

LeetCode ↗
Approach: Union Find
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps