| 384 | RBTree::RBTreeNode* RBTree::RBTreeNode::NIL = new RBTree::RBTreeNode(0, 0, RBTree::BLACK); |
| 385 | |
| 386 | int main() |
| 387 | { |
| 388 | RBTree t; |
| 389 | int i, count = 5; |
| 390 | int key; |
| 391 | |
| 392 | srand(time(NULL)); |
| 393 | int arr[] = {2, 8, 4, 9, 1}; |
| 394 | for (i = 0; i < count; ++i) { |
| 395 | t.set(arr[i], i); |
| 396 | } |
| 397 | |
| 398 | for (i = 0; i < count; ++i) { |
| 399 | t.remove(arr[i]); |
| 400 | } |
| 401 | |
| 402 | return 0; |
| 403 | } |