Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main<T extends Comparable <T>>
- {
- public static void main(String[] args)
- {
- BSTree<Integer> bst = new BSTree<Integer>();
- bst.add(108);
- bst.add(3);
- bst.add(2);
- bst.add(1);
- bst.add(5);
- bst.add(5);
- bst.add(4);
- bst.add(6);
- bst.add(7);
- bst.add(9);
- bst.add(8);
- System.out.println("In Order Print:");
- bst.inOrderPrint();
- System.out.println("\n" + bst.toString());
- System.out.println("\n" + bst.size());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement