| 1234567891011121314151617181920212223242526272829 |
- // Driver program to test above functions
- #include "BST.h"
- int main()
- {
- BST avl;
- avl.Insert(2);
- //avl.printTree();
- avl.Insert(3);
- //avl.printTree();
- avl.Insert(4);
- //avl.printTree();
- avl.Insert(5);
- //avl.printTree();
- avl.Insert(1);
- //avl.printTree();
- avl.Insert(6);
- //avl.printTree();
- avl.Insert(7);
- //avl.printTree();
- avl.Insert(8);
- //avl.printTree();
- avl.Insert(9);
- //avl.Insert(50);
- //avl.printTree();
- avl.Delete(6);
- avl.JSON();
- return 0;
- }
|