Assignment 4 overviewAssignment 4 asks you to display a binary search tree using breadth first (also called level order) traversal. The BST obtained by inserting numbers from a JSON string "[ 8, 4, 2, 1, 3, 6, 5, 7, 9 ]" using this traversal is shown below, Today's lab overviewIn today's lab, we will use a simpler version using preorder traversal to display a tree. The methods we use in the lab will help you in displaying your tree for the homework assignment. We will display the tree using both a graphical window and via text to the console. An example of a randomly generated tree displayed via preorder traversal is shown below,
Graphical preorder display Text preorder display |
Download class files for the lab below,
|
http://cs-people.bu.edu/tvashwin/cs112_spring08/lab06.html |