Skip to content
Leetcode
Esc
↑↓navigate↵open⌘Jpreview

Union Find

Union-Find (Disjoint Set Union) is a data structure that maintains a collection of disjoint sets and supports efficiently finding which set an element belongs to and merging two sets.

Last updated on September 24, 2026

Was this page helpful?