1. Implement a new method for the BTNode from Figure 9.10 on page 490. The new method creates a Java Vector that contains the data from all the nodes in a tree, as specified in Figure 9.15. Details about the Java Vector class are provided in Appendix D, although the only Vector method you’ll use is addElement.
Also specify and implement similar methods that use in-order and post-order traversals instead of a pre-order traversal. Which of your three new methods creates a Vector with the entries sorted from smallest to largest?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here