the disjoint sets class figure eight elementsinitially in different sets easybecause the only information we will need is parent link the name of set is given by the node at the root since only the name of the parent is requiredwe can assume that this tree is stored implicitly in an arrayeach entry [iin the array represents the parent of element if is rootthen [ - in the forest in figure [ - for < as with binary heapswe will draw the trees explicitlywith the understanding that an array is being used figure shows the explicit representation we will draw the root' parent link vertically for convenience to perform union of two setswe merge the two trees by making the parent link of one tree' root link to the root node of the other tree it should be clear that this operation takes constant time figures and represent the forest after each of union( , )union( , )union( , )where we have adopted the convention that the new root after the union( ,yis the implicit representation of the last forest is shown in figure find(xon element is performed by returning the root of the tree containing the time to perform this operation is proportional to the depth of the node representing xassumingof coursethat we can find the node representing in constant time using the strategy aboveit is possible to create tree of depth so the worst-case running figure after union( , figure after union( ,