Disjoint Set
In computer science, a disjoint-set data structure is also called a union-find data structure or merge–find set. It is a data structure that stores a collection of disjoint (non-overlapping) sets. Equivalently, it stores a partition of a set into disjoint subsets. It provides operations for adding new sets, merging sets (replacing them by their union), and finding a representative member of a set. The last operation allows to find out efficiently if any two elements are in the same or different sets. In simple words, a Disjoint Set means dividing the individuals into different sets according to the groups in which they fall and each set is represented by one of its members.
Disjoint Set Unions - Union Find Algorithm
By Aanchal Tiwari
● Published At Nov 2021
The choice of an efficient algorithm reduces time complexity. Today’s article discusses one such algorithm - Union find algorithm. ... Keep reading ..
Permutation Swaps
By Nishant Rana
● Published At Jan 2022
This blog will cover the question of Permutation swaps and discuss their Time and Space complexity. ... Keep reading ..
The Earliest Moment When Everyone Becomes Friends
By Soumya Agrawal
● Published At Jan 2022
This article will cover the widespread problem of the Disjoint-set, i.e., The earliest moment when everyone becomes friends.... Keep reading ..
Count of Distinct Groups of Strings Formed after Performing an Equivalent Operation
By Soumya Agrawal
● Published At Jan 2022
This article will cover the concept of string and the problem of counting the distinct string group after performing an operation.... Keep reading ..
Minimum Cost to connect the graph by choosing any vertices that have a cost of at least 0
By Vaibhav Agarwal
● Published At Jan 2022
In this article, we will discuss the approach to connect the graph in minimum cost, in which cost for connecting each vertex is given to us.... Keep reading ..
Maximum sum of segments among all segments formed in array after Q queries
By Anant Dhakad
● Published At Jan 2022
The choice of an efficient algorithm reduces time complexity. This article discusses a problem based on one such article, the Union-Find algorithm.... Keep reading ..