codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
202 stars 270 forks source link

Disjoint-set Forest Data Structure #531

Open ayush-09 opened 1 year ago

ayush-09 commented 1 year ago

Description of the problem

The disjoint-set forest, also known as the union-find data structure, is used to keep track of disjoint sets. It supports efficient union and find operations. It is commonly used to solve problems involving connectivity, such as finding connected components or detecting cycles in a graph. The disjoint-set forest is implemented using trees, where each node points to its parent. The root of each tree represents the set leader. The data structure offers nearly constant time complexity on average and can be optimized using techniques like path compression and union by rank.

Example of the problem

ayush-09 commented 1 year ago

@czgdp1807 Please review this issue. Can I work on this issue ? GSSoC'23