Closed dharasim closed 5 years ago
The correct data structure would be a list of trees, with every leaf being a singleton tree in the beginning. Merging would then remove a subsequence of trees from the list and insert a new tree in their place, where the old roots become the direct children of the new root.
Good suggestion!
Fixes #2