Commit Graph

2 Commits

Author SHA1 Message Date
Aanuoluwapo Babajide
1f5134b368
Create alternate_disjoint_set.py (#2302)
* Create alternate_disjoint_set.py

This code implements a disjoint set using Lists 
with added heuristics for efficiency
Union by Rank Heuristic and Path Compression

* Update alternate_disjoint_set.py

Added typehints, doctests and some suggested variable name change

* Update alternate_disjoint_set.py

* Formatted with Black

* More formatting

* Formatting on line 28

* Error in Doctest

* Doctest Update in alternate disjoint set

* Fixed build error

* Fixed doctest
2020-08-28 18:25:02 +02:00
luoheng
01601e6382 Add disjoint set (#1194)
* Add disjoint set

* disjoint set: add doctest, make code more Pythonic

* disjoint set: replace x.p with x.parent

* disjoint set: add test and refercence
2019-09-23 05:08:20 +02:00