proved performance you should compare the following four implementations(astandard union/find with path compression and weighted union (bpath compression and weighted unionexcept that path compression is done after the unioninstead of during the find operation that ismake all nodes along the paths traversed in both trees point directly to the root of the larger tree (cweighted union and simplified form of path compression at the end of every find operationmake the node point to its tree' root (but don' change the pointers for other nodes along the path(dweighted union and simplified form of path compression both nodes in the equivalence will be set to point directly to the root of the larger tree after the union operation for exampleconsider processing the equivalence (abwhere is the root of and is the root of assume the tree with root is bigger than the tree with root at the end of the union/find operationnodes aband will all point directly to