Skip to content

Commit

Permalink
Shorten LinkCutTree rot()
Browse files Browse the repository at this point in the history
  • Loading branch information
PBBx0 authored and simonlindholm committed Dec 13, 2023
1 parent 81d547a commit 7942c79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/graph/LinkCutTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ struct Node { // Splay tree. Root's pp contains tree's parent.
c[i] = z->c[i ^ 1];
if (b < 2) {
x->c[h] = y->c[h ^ 1];
z->c[h ^ 1] = b ? x : this;
y->c[h ^ 1] = x;
}
y->c[i ^ 1] = b ? this : x;
z->c[i ^ 1] = this;
fix(); x->fix(); y->fix();
if (p) p->fix();
swap(pp, y->pp);
Expand Down

0 comments on commit 7942c79

Please sign in to comment.