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

Method set

templates/rb.cpp:272–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270 }
271
272 void set(int k, int v)
273 {
274 if (root == nil) {
275 root = new RBTreeNode(k, v, BLACK);
276 } else {
277 auto z = new RBTreeNode(k, v, RED);
278 insert(root, z);
279 }
280
281 dump(root);
282 }
283
284 void transplant(RBTreeNode* u, RBTreeNode* v)
285 {

Callers 2

main2Function · 0.45
mainFunction · 0.45

Calls 1

insertFunction · 0.50

Tested by

no test coverage detected