docs: private void rotateRight(int n) {
          final int l = left(n);
          final int rl = right(l);
          left(n, rl);
          if (rl != NIL) {
              parent(rl, n);
          }
          final int p = parent(n);
          parent(l, p);
          if (p == NIL) {
              root = l;
          } else if (right(p) == n) {
              right(p, l);
          } else {
              assert left(p) == n;
              left(p, l);
          }
          right(l, n);
          parent(n, l);
          fixAggregates(n);
          fixAggregates(parent(n));
      }