4 ms·
Optimal depth for union-find is O(1); every node points directly to the root. It's a very different case than building a binary search tree.
by eutectic 6y ago
Optimal depth for union-find is O(1); every node points directly to the root. It's a very different case than building a binary search tree.