- - - - - - - - figure forest with implicit representation for union-by-size and union-by-height /*union two disjoint sets for simplicitywe assume root and root are distinct and represent set names root is the root of set root is the root of set *void disjsets::unionsetsint root int root ifsroot sroot /root is deeper sroot root /make root new root else ifsroot =sroot --sroot ]/update height if same sroot root /make root new root figure code for union-by-height (rank