1. Rewrite the pre-order traversal from page 484 so that it is a static method with one parameter (a reference to the root node of the tree). In what way is the static method more general than the nonstatic method?
2. Suppose we do a traversal of the tree in Figure 9.1 on page 455, printing out the numbers in the order 13, 9, 53, 17, 19, 7, 4, 11, 14. What kind of traversal did we do? In what order are the numbers printed for the other kinds of traversals?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here