CSCI 2720 Data Structures Spring 2004 Homework Assignment #5 Due at the start of class on Thursday April 22. Be sure to explain your answers when asked to do so. All the problems are from Ch. 7 or 8 of the text by Lewis and Denenberg. ------------------------ Chapter 7 problems ---------------------------------- 2(a) (10 pts.) Directions: show each tree (10 trees). 11(a) (10 pts.) 14 (10 pts.) Directions: show each tree (10 trees). 19 (10 pts.) Directions: don't count the last step to an external leaf in the height; so for example the tree in Figure 7.13 has height 2. 25 (10 pts.) Directions: show each tree (10 trees). 26(a)(b) (10 pts. for both parts) Directions: show each tree (11 trees). ------------------------ Chapter 8 problems ---------------------------------- 5(a)(b)(c) (15 pts. for all 3 parts) 7 (5 pts.) 10 (10 pts.) Directions: each node has fields Char, Child, and Sibling, containing char, node*, and node* respectively. When Char contains the end_of_string symbol, Child contains a pointer to information about the string just terminated. Write C++ code for a non-recursive function Info* Find(char*, node*) so that the call Find(s, Tree) returns a null pointer if string s is not in the de la Briandais tree Tree, and a pointer to information about s if it is in Tree. Assume that Info* and node* are different types. 13 (10 pts.)