main.cpp
来自「AVL均衡二叉树的的C++模板实现。带有册除功能」· C++ 代码 · 共 34 行
CPP
34 行
#include < iostream >
#include < iomanip >
#include "AVLTree.h"
using namespace std;
void main()
{
AVLTree < int > T(-1);
//cin>>T;
T.Insert(70);
T.Insert(60);
T.Insert(5);
T.Insert(10);
T.Insert(40);
T.Insert(50);
T.Insert(15);
T.Insert(25);
T.Insert(20);
T.Insert(30);
cout<<T;
int d;
cout<<"Enter a value to be deleted(End with -1): ";
cin>>d;
while(d != -1) {
T.Delete(d);
cout<<T;
//system("pause");
cout<<"Enter a value to be deleted(End with -1): ";
cin>>d;
}
system("pause");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?