Union(H1, H2) H = new heap whose root list contains roots from H1 and H2 n(H) = n(H1) + n(H2) min(H) = min(H1) if (min(H1) = NIL) or (min(H2) NIL and min(H2) <min(H1)) then min(H) = min(H2)
Analysis:
t(H) = t(H1) + t(H2) m(H) = m(H1) + m(H2)