YUNOVA · Data Structures & Algorithms · Module 12: Advanced graphs

Disjoint set union (Union-Find)

Notes for offline study · 30 November 2026

Disjoint set union (Union-Find)

Key points

  • DSU keeps elements in disjoint sets with find and union operations.
  • Path compression and union by rank make operations nearly constant time.
  • It is used for cycle detection and Kruskal's algorithm.

Free on YUNOVA · yunova.in · Sign in to add your own lesson notes to this sheet.