


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



n−r
a−f
giraffe snake
mouse
a−f t−z
giraffe snake
lion
h−l
h−k
n−r t−z
18.5 Tree Iterators
18.6 Exercise
18.7 Limitations of Our BST Implementation
18.8 Red-Black Trees
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL NULL
NULL
NULL
NULL
14
1 3
8
4
6
5 7 9
10
12
11 13
2
bool sanity_check() const { if (root_ == NULL) return true; if (root_->parent != NULL) return false; return sanity_check(root_); } iterator begin() const { if (!root_) return iterator(NULL); TreeNode
private: // REPRESENTATION TreeNode
int erase(T const& key_value, TreeNode
bool sanity_check(TreeNode