adding cs235
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user