CS 221Homework Assignment
Due:_____________
Binary Tree
Level and Subtree Hieghts
Write a program that will input a list of integers (or characters) and build a
binary tree using the values in the order they are received. Print out the following:
- A list of the values from the tree when it is traversed using in-order traversing.
- A list of the values from the tree when it is traversed using pre-order traversing.
- A list of all the values in the tree with the following information:
- The level of the value in the tree (the root node is at level 1).
- The height of the left and right subtrees.
- The values in the root nodes of the left and right subtrees. Print a dash (-) if none.