Skip to content

Commit

Permalink
Merge branch 'hotfix/2.2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
xorz57 committed Sep 22, 2017
2 parents d802f8b + dcc7a79 commit 72e4bee
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main() {
red_black_tree.insert(45,0);
// Perform an in order traversal
binary_search_tree.in_order_traversal();
red_black_tree.in_order_traversal();
return 0;
}
Expand Down
10 changes: 7 additions & 3 deletions examples/example_binary_search_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ int main(int argc, char const *argv[]) {
std::cout << std::endl;

auto min = binary_search_tree.minimum();
std::cout << "Minimum: " << min->key << std::endl;
if (min != nullptr) {
std::cout << "Minimum: " << min->key << std::endl;
}

auto max = binary_search_tree.maximum();
std::cout << "Maximum: " << max->key << std::endl;
if (max != nullptr) {
std::cout << "Maximum: " << max->key << std::endl;
}

std::cout << "Height: " << binary_search_tree.height() << std::endl;

Expand All @@ -51,6 +55,6 @@ int main(int argc, char const *argv[]) {
std::cout << std::endl;
n->info();
}

return 0;
}
8 changes: 6 additions & 2 deletions examples/example_red_black_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ int main(int argc, char const *argv[]) {
std::cout << std::endl;

auto min = red_black_tree.minimum();
std::cout << "Minimum: " << min->key << std::endl;
if (min != nullptr) {
std::cout << "Minimum: " << min->key << std::endl;
}

auto max = red_black_tree.maximum();
std::cout << "Maximum: " << max->key << std::endl;
if (max != nullptr) {
std::cout << "Maximum: " << max->key << std::endl;
}

std::cout << "Height: " << red_black_tree.height() << std::endl;

Expand Down
8 changes: 6 additions & 2 deletions examples/example_splay_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ int main(int argc, char const *argv[]) {
std::cout << std::endl;

auto min = splay_tree.minimum();
std::cout << "Minimum: " << min->key << std::endl;
if (min != nullptr) {
std::cout << "Minimum: " << min->key << std::endl;
}

auto max = splay_tree.maximum();
std::cout << "Maximum: " << max->key << std::endl;
if (max != nullptr) {
std::cout << "Maximum: " << max->key << std::endl;
}

std::cout << "Height: " << splay_tree.height() << std::endl;

Expand Down

0 comments on commit 72e4bee

Please sign in to comment.