andz
andz copied to clipboard
Optional operations for DisjointSetsForest
- [x] size (number of elements in the data structure)
- [x] contains (checks if an element is in the data structure)
- [x] sets (number of sets in the data structure: may be useful for example to understand how far are we to have just one set, etc)
- [ ] Erase or clear the data structure
- [ ] Deletion of an element from a set (and from the data structure)
- [ ] Deletion of a whole (disjoint) set
- [ ] Pretty-print a set (similar to how we're pretty-printing a BST)
- [ ] Counting elements in a set (this could also be a property)