Homework Assignment #4
Due : May 17 , 2004
-
The following problems are from R.Johnsonbaugh's Discrete Mathematics :
- #2 #3 #5 #6 section 10.3 page 471-472
- #16 #17 section 10.3 page 472
- #26 ,#27 section 10.3 page 472
- The following problems are from Weiss' Text :
- #4.8 page 146 : Give the prefix, infix and postfix expressions corresponding to the tree in Figure 4.65.
- #4.9 :
- Show the result of inserting 3,1,4,6,9,2,5,7 into an initially empty binary search tree.
- Show the result of deleting the root.
- #4.18 (b) only : What is the minimum number of nodes in an AVL tree of height h = 15?
- #4.19 page 147 : Show the result of inserting 2,1,4,5,9,3,6,7 into an initially empty AVL tree.
- #4.31 page 148 : Write efficient methods that takes only a reference to the root of a bianary
tree,T, and compute :
- The number of nodes in T
- The number of leaves in T
- The number of full nodes in T.
What is the running time of your routines?