Enhanced UNION
UNION(x,y): try to make the smaller tree point to the root of the larger.
Height method: Try to use the higher root as the new root. (Difficult to easily update heights when path compression is done with FIND; instead we can use ranks -- estimated heights.)
Weight method: Try to use the root of the larger up-tree as the new root. Keep a count of nodes at the root of each up-tree, using a 1-bit flag in each node to tell whether it’s the root.