MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / transplant

Method transplant

templates/rb.cpp:284–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282 }
283
284 void transplant(RBTreeNode* u, RBTreeNode* v)
285 {
286 if (u->p == nil) {
287 root = v;
288 root->p = nil;
289 } else {
290 u->p->replaceChild(u, v);
291 }
292 }
293
294 void deleteFixUp(RBTreeNode* x)
295 {

Callers

nothing calls this directly

Calls 1

replaceChildMethod · 0.45

Tested by

no test coverage detected