-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
43 lines (42 loc) · 1.13 KB
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "BTree.h"
int main(){
BTree tree = BTree();
tree.Insert("saber",123);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("lancer", 234);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("caster", 345);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("archer", 456);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("assassin", 567);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("berserker", 678);
tree.PrintAll(tree.GetRoot());
cout << tree.GetRoot()->GetOccupancy() << endl;
cout<<endl;
tree.Insert("rider", 789);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("teacher", 910);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("gaotian", 1789);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("hexiaohe", 111);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("az",11121);
tree.PrintAll(tree.GetRoot());
cout<<endl;
tree.Insert("av",999);
tree.PrintAll(tree.GetRoot());
cout<<endl;
cout << tree.GetRoot()->GetOccupancy() << endl;
}