test.cpp

来自「代码实现了二叉树基本操作:实现二叉树的基本操作(包括前序、中序、后序遍历);从键」· C++ 代码 · 共 27 行

CPP
27
字号
#include"BST.h"
#include<iostream>
using namespace std;
int main()
{
	BST bst;
	int a;
	for(int i=0;i<9;i++)
	{
		cin >> a;
		bst.Insert(a);
	}
	cout << bst.CountLeaf() << endl;
	cout << bst.Hight() << endl;
	bst.PrintTree();
	cout << endl;
	cout << "************************************\n";
	bst.PrintTree1();
	cout << endl;
	cout << "************************************\n";
	bst.PrintTree2();
	cout << endl;
	cout << "************************************\n";
	bst.Output();
	return 0;
}
//5 3 4 9 8 7 11 10 12

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?