Skip to content

luistar/union-find-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

union-find-c

C implementation of the union-find data structure (with sets as trees). This implementation features path compression and union by rank, thus the amortized time per operation is O(alpha(n)).

Functions

union_find_elem_t * make_set(void * element);
union_find_elem_t * find(union_find_elem_t * element);
union_find_elem_t * merge(union_find_elem_t * a, union_find_elem_t * b);

About

C implementation of the union-find data structure

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages