Programming Homework Help

Arizona Western College Unbalanced Binary Search Tree Java Coding Worksheet

 

1. Draw a table that is going to be created if we use below commands:

HashIntSet h = new HashIntSet();
h.add(89);
h.add(67);
h.add(15);
h.add(105);
h.add(16);
h.add(77);
h.add(22);
h.add(10);
h.add(29);
h.add(87);
h.add(65);
h.add(78);90

You are adding methods to the class you created for in myBST.java(can’t upload java file, so I converted it to .word), please use provided template.

2. Implement rotateLeft and rotateRight. (It might be a binary tree rotation, See attached screenshot.)