bstTest.cpp 537 B

1234567891011121314151617181920212223242526272829
  1. // Driver program to test above functions
  2. #include "BST.h"
  3. int main()
  4. {
  5. BST avl;
  6. avl.Insert(2);
  7. //avl.printTree();
  8. avl.Insert(3);
  9. //avl.printTree();
  10. avl.Insert(4);
  11. //avl.printTree();
  12. avl.Insert(5);
  13. //avl.printTree();
  14. avl.Insert(1);
  15. //avl.printTree();
  16. avl.Insert(6);
  17. //avl.printTree();
  18. avl.Insert(7);
  19. //avl.printTree();
  20. avl.Insert(8);
  21. //avl.printTree();
  22. avl.Insert(9);
  23. //avl.Insert(50);
  24. //avl.printTree();
  25. avl.Delete(6);
  26. avl.JSON();
  27. return 0;
  28. }