コード例 #1
0
ファイル: main.cpp プロジェクト: joheec/JUMBO15
void print_tree_details(BinarySearchTree &bst) {
        bst.print_tree();
        cout << "\n";
        cout << "min: " << bst.find_min() << "\n";
        cout << "max: " << bst.find_max() << "\n";
        cout << "nodes: " << bst.node_count() << "\n";
        cout << "count total: " << bst.count_total() << "\n";
        cout << "tree height: " << bst.tree_height() << "\n";
        cout << "\n";
}
コード例 #2
0
ファイル: main.cpp プロジェクト: joheec/JUMBO15
void test_find_max() {
	BinarySearchTree * tree = new BinarySearchTree;
	test_insert(tree);
	cout << tree->find_max() << "\n";
}