Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- SplayTree X = new SplayTree();
- X.add(18)
- }
- /**
- * Default constructor constructs an empty tree.
- */
- public SplayTree()
- {
- size = 0;
- }
- /**
- * Needs to call addBST() later on to complete tree construction.
- */
- public SplayTree(E data)
- {
- root.data = data;
- size = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement