-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
47 lines (35 loc) · 1.02 KB
/
main.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
44
45
46
47
#include <iostream>
#include "LinkedList.h"
#include "BST.h"
using namespace std;
int main(){
LinkedList tList = LinkedList();
char* c = new char[3];
c[1] = '\n';
c[2] = '\0';
for(int i = 0; i < 200000; i++){
c[0] = (char)i;
tList.Insert(c, NULL);
}
tList = tList;
cout << "LinkedList contents:" << tList.GetSize() << endl;
//tList->Output(cout);
//tList->Clear();
LinkedList tNew = tList;
//tList->Clear();
cout << endl << endl << "List Copy contents:" << tNew.GetSize() << endl;
//tNew.Output(cout);
BST* tBST = new BST();
BSTNode* tBSTNode;
tBSTNode = tBST->Insert("Cool\n");
tBSTNode = tBST->Insert("Awesome\n");
tBSTNode = tBST->Insert("Test\n");
tBSTNode = tBST->Insert("1\n");
//tBST->Remove(tBSTNode);
tBSTNode = tBST->Insert("4\n");
tBSTNode = tBST->Insert("2\n");
tBSTNode = tBST->Insert("3\n");
cout << endl << endl << "BST contents:" << tBST->GetSize() << endl;
tBST->Output(cout, tBST->GetRoot());
delete tBST;
}