Open In App

DSU Full Form

DSU Full Form

The term DSU stands for Disjoint Set Union, in the context of Computer Science.

What is DSU?

A data structure that stores non overlapping or disjoint subset of elements is called disjoint set data structure.
Condition for two sets to be disjoint: Two sets are called disjoint sets if they don’t have any element in common, the intersection of sets is a null set.

Why is Disjoint Set Data Structure known as Disjoint Set Union or DSU?

Disjoint Set Data Structures are often called Disjoint Set Union or DSU because of their two main operations:



It means that if we are given several elements, each of which is a separate set, a Disjoint Set Data Structure will have an operation to combine any two sets (UNION), and it will be able to tell in which set a specific element is (DISJOINT SET).

As a combination of the above operations, Disjoint Set Data Structures are also called as Disjoint Set Union or DSU.



Basic Operations in DSU

Thus the basic implementation of the DSU data structure consists of only three operations:

Time Complexity of Disjoint Set Data Structure or DSU

The main advantage of using DSU is that it allows the above operations in constant time, i.e. O(1) on average.

Article Tags :
DSA