Skip to content

Pattern: Graph - Union Find (Disjoint Set) #126

@sudosf

Description

@sudosf

Objective

Master the Union-Find data structure from the RisingBrain DSA sheet.

References

Pattern Description

Disjoint Set Union (DSU). Two operations: find(x) returns root of x's component, union(x, y) merges two components. With path compression and union by rank, both run near O(1) amortized.

Sub-issues

# Problem Difficulty
1 Number of Connected Components in Graph Medium
2 Redundant Connection Medium
3 Accounts Merge Medium

Notes

Language: Java

Metadata

Metadata

Assignees

No one assigned

    Labels

    graphGraph problems

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions