Clarifications in response to student questions are posted in red typeface.
(b) [1 point] Traverse the BST using DFS and label the vertices by their values as they are encountered, as you did for Homework #5.
(c) [1 point] Repeat Question 1b), but for BFS instead of DFS.
(d) [1 point] Tell which method - DFS or BFS - would be better for outputting the BST values in sorted order. You do not have to start at the root of the tree. To get credit, you must explain your answer in 1-2 sentences.
(b) [1 point] Insert the values -46, -47, 38, 39, 40, and 45 into the BST you diagrammed in Question 2a) and draw the new BST (the resultant tree, after all values are inserted).
(c) [1 point] Using the array representation of a binary tree that we discussed in class, diagram the array representation of the tree you obtained in Question 2a).
(d) [1 point] Repeat Question 2c) for the tree you obtained in Question 2b).
(b) [1 point] Give a general algorithm and formula for computing the fill factor from an array representation of a BST that has N nonempty nodes and L levels.
(c) [1 point] Apply the formula for fill factor that you derived in Question 3b) to yield the fill factor for the two trees you produced in Questions 2c) and 2d).
(b) [3 points] Insert the values -46, -47, and 39 into the AVL tree you diagrammed in Question 5a), and draw all rotations for each insertion.
(b) [2 points] Each insertion in Question 5b).
Copyright © 1999 by Mark S. Schmalz.