Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1.     public static void main(String[] args) {
  2.         SplayTree X = new SplayTree();
  3.         X.add(18)
  4.     }
  5.     /**
  6.      * Default constructor constructs an empty tree.
  7.      */
  8.     public SplayTree()
  9.     {
  10.         size = 0;
  11.     }
  12.    
  13.    
  14.     /**
  15.      * Needs to call addBST() later on to complete tree construction.
  16.      */
  17.     public SplayTree(E data)
  18.     {
  19.         root.data = data;
  20.         size = 1;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement