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

Method erase

code/data-structures/dancing_links.cpp:20–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 if (!back) back = front;
19 return front; }
20 void erase(node *n) {
21 if (!n->l) front = n->r; else n->l->r = n->r;
22 if (!n->r) back = n->l; else n->r->l = n->l; }
23 void restore(node *n) {
24 if (!n->l) front = n; else n->l->r = n;
25 if (!n->r) back = n; else n->r->l = n; } };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected