Java Reference
In-Depth Information
΢ Exercise R16.9. Verify the hash codes of the strings "Jim" and "Joe" in
Table 1 .
΢ Exercise R16.10. From the hash codes in Table 1 , show that Figure 6
accurately shows the locations of the strings if the hash table size is 101.
΢ Exercise R16.11. What is the difference between a binary tree and a binary
search tree? Give examples of each.
΢ Exercise R16.12. What is the difference between a balanced tree and an
unbalanced tree? Give examples of each.
΢ Exercise R16.13. The following elements are inserted into a binary search
tree. Make a drawing that shows the resulting tree after each insertion.
Adam
Eve
Romeo
Juliet
Tom
Dick
Harry
΢΢Exercise R16.14. Insert the elements of Exercise R16.13 in opposite order.
Then determine how the BinarySearchTree.print method prints
out both the tree from Exercise R16.13 and this tree. Explain how the
printouts are related.
΢΢Exercise R16.15. Consider the following tree. In which order are the nodes
printed by the BinarySearchTree.print method?
Search WWH ::




Custom Search