Disjoint Set - Data Structure
Oct 12, 2025 · 2 min read · Introduction A disjoint set is a data structure that helps determine if two nodes are part of the same component efficiently. While BFS or DFS can be used to check this, a disjoint set can perform the task in constant time. It is particularly useful ...
Join discussion