Skip to content

ivanbgd/Disjoint-Sets-Data-Structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Disjoint Sets Data Structure

This is an efficient implementation of the Disjoint Sets data structure, written in Python.

Uses Trees, Union by Rank Heuristic, and Path Compression Heuristic.

Uses 1-based indexing of arrays.

When both union by rank heuristic and path compression heuristic are used, the average running time of each operation is nearly constant.

The code includes examples.

About

Efficient implementation of the Disjoint Sets data structure in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages