MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / augment

Method augment

code/data-structures/avl_tree.cpp:27–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 if (n->p->r == n) return n->p->r;
26 assert(false); }
27 void augment(node *n) {
28 if (!n) return;
29 n->size = 1 + sz(n->l) + sz(n->r);
30 n->height = 1 + max(height(n->l), height(n->r)); }
31 #define rotate(l, r) \
32 node *l = n->l; \
33 l->p = n->p; \

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected