开源地址:https://github.com/dimitrilw/toybox
toybox
Various data-structures and other toys implemented in Mojo🔥.


package
- Clone repo & cd into it.
- Run:
mojo package toybox/toybox -o /path/to/your/packages/toybox.mojopkg
toys
disjoint set
aka "union find", aka "merge find", aka "merge set", aka "disjoint set union (DSU)"
from toybox import DisjointSet
example use
See the tests directory. While files like test_disjointset.mojo
are just testing
the DisjointSet implementation, files like test_disjointset_example_kruskal_mst.mojo
provide an example use.
external dependencies
Until Mojo has a mature package manager, this repository keeps dependencies in
the external/
directory.