In this implementation, when we traverse a path to find the representative of a set, we make every other element on the path point directly to the representative. This reduces the height of the tree by approximately half, but may result in longer paths if the tree is unbalanced. The time complexity of this implementation is also O(alpha(n)).