At the end of the initial insert: correct = 8, incorrect_insert = 0 The set size is 7 Here are the elements: abc daddy friend good-bye hello puppy zebra "foo" is not in the set "puppy" is in the set The iterator points to puppy "daddy" is in the set The iterator points to daddy Here is the tree, printed sideways. The indentation is proportional to the depth of the node so that the value stored at the root is the only value printed without indentation. Also, for each node, the right subtree can be found above where the node is printed and indented relative to it zebra puppy hello good-bye friend daddy abc set1.size() = 7, set2.size() = 7 Here is set2 printed sideways: zebra puppy hello good-bye friend daddy abc After two inserts: set1.size() = 7, set2.size() = 9 The contents of set2: a abc b daddy friend good-bye hello puppy zebra Here is set2 printed sideways zebra puppy hello good-bye friend daddy b abc a Tried erase "hello" and got num (should be 1) = 1 Here is the tree: zebra puppy good-bye friend daddy b abc a Tried erase "a" and got num (should be 1) = 1 Tried erase "hello" and got num (should be 0) = 0 Tried erase "abc" and got num (should be 1) = 1 Tried erase "friend" and got num (should be 1) = 1 Here is the tree: zebra puppy good-bye daddy b Back to set1, after inserting "car" and "cabbage" the tree looks like zebra puppy hello good-bye friend daddy car cabbage abc ======================== == Main HW 8 tests: === ======================== The tree's height is 6, and its average depth is 2.66667 Here is the tree in level order Level 0: hello Level 1: good-bye puppy Level 2: friend zebra Level 3: abc Level 4: daddy Level 5: car Level 6: cabbage Is the tree balanced? no After rebalancing the tree is now zebra puppy hello good-bye friend daddy car cabbage abc Is the tree balanced? yes After inserting "dog", the tree should still be balanced. Is it? yes After inserting "grade", the tree should no longer be balanced. Is it? no Before lower_bound and upper_bound operations, the tree is zebra puppy hello grade good-bye friend dog daddy car cabbage abc And in level order it is Level 0: friend Level 1: car puppy Level 2: cabbage daddy hello zebra Level 3: abc dog good-bye Level 4: grade Forward iteration through the tree produces: abc cabbage car daddy dog friend good-bye grade hello puppy zebra Lower bound of "friend" should reference "friend". It DOES Lower bound of "dear" should reference "dog". It DOES Lower bound of "zoo" should be the end iterator. It IS Upper bound of "friend" should reference "good-bye". It DOES Upper bound of "dear" should reference "dog". It DOES Upper bound of "zoo" should be the end iterator. It IS Forward iteration through the tree produces: abc cabbage car daddy dog friend good-bye grade hello puppy zebra After two erases with iterators, which should remove "friend" and "dog" the tree looks like zebra puppy hello grade good-bye daddy car cabbage abc Forward iteration through the tree produces: abc cabbage car daddy good-bye grade hello puppy zebra Going backwards to test decrement operator strings[3] = daddy, *p = daddy strings[2] = car, *p = car strings[1] = cabbage, *p = cabbage strings[0] = abc, *p = abc *** Now building an int set and testing operator == Here is the tree 19 12 10 7 5 4 3 1 ---- After erasing 3 19 12 10 7 5 4 1 After copying, int_set == int_set2 is true After erasing 10 from int_set and 19 from int_set2, int_set == int_set2 is false After erasing 19 from int_set and 10 from int_set2, int_set == int_set2 is true