code: private Node<E> findRoot(Node<E> node) {
      if (node.parent != node) {
        node.parent = findRoot(node.parent);
      }
      return node.parent;
    }
docs: Given a {@link Node}, walk the parent field as far as possible, until
  reaching the root, which is the {@link Node} for the current
  representative of this equivalence class. To achieve low runtime
  complexity, also compress the path, by making each node a direct child of
  the root.