Back to all patterns

Union Find

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Union Find pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (1)

Redundant Connection

Find the edge that can be removed to make the graph a tree.

Key Signals:

Detect cycle during edge additionReturn last edge causing cycleUnion find