school/cs235/lab09/test.cpp

21 lines
405 B
C++
Raw Normal View History

2016-04-06 20:46:10 -07:00
#include "bst.h"
#include <iostream>
using namespace std;
int main() {
bst b;
b.add(1);
cout << b.root->data << endl;
b.add(-1);
cout << b.root->left->data << endl;
//cout << b.root->right->data << endl;
b.add(4);
cout << b.root->right->data << endl;
b.add(5);
cout << b.root->right->right->data << endl;
b.remove(5);
cout << b.root->data << endl;
}