Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class Main<T extends Comparable <T>>
  2. {
  3. public static void main(String[] args)
  4. {
  5. BSTree<Integer> bst = new BSTree<Integer>();
  6.  
  7. bst.add(108);
  8. bst.add(3);
  9. bst.add(2);
  10. bst.add(1);
  11. bst.add(5);
  12. bst.add(5);
  13. bst.add(4);
  14. bst.add(6);
  15. bst.add(7);
  16. bst.add(9);
  17. bst.add(8);
  18.  
  19. System.out.println("In Order Print:");
  20. bst.inOrderPrint();
  21.  
  22. System.out.println("\n" + bst.toString());
  23.  
  24. System.out.println("\n" + bst.size());
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement