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

Function main2

templates/rb.cpp:426–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424RBTree::RBTreeNode* RBTree::RBTreeNode::NIL = new RBTree::RBTreeNode(0, 0, RBTree::BLACK);
425
426int main2()
427{
428 RBTree t;
429 int n = 100;
430
431 for (int i = 1; i <= n; i++) {
432 printf("set %d %d\n", i, i);
433 t.set(rand() % n, i);
434 }
435
436 for (int i = 1; i <= n; i++) {
437 printf("remove %d\n", i);
438 t.remove(i);
439 }
440
441 for (int i = 1; i <= n; i++) {
442 t.set(i, i);
443 }
444
445 for (int i = 1; i <= n; i++) {
446 printf("get %d %d\n", i, t.get(i));
447 }
448
449 return 0;
450}
451
452int main()
453{

Callers

nothing calls this directly

Calls 3

setMethod · 0.45
removeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected