static <V> TreeNode<V> rotateLeft(TreeNode<V> root,
                                            TreeNode<V> p) {
          TreeNode<V> r, pp, rl;
          if (p != null && (r = p.right) != null) {
              if ((rl = p.right = r.left) != null)
                  rl.parent = p;
              if ((pp = r.parent = p.parent) == null)
                  (root = r).red = false;
              else if (pp.left == p)
                  pp.left = r;
              else
                  pp.right = r;
              r.left = p;
              p.parent = r;
          }
          return root;
      }
static <V> TreeNode<V> rotateLeft(TreeNode<V> root,
                                            TreeNode<V> p)