Course Home |
Homework |
Programming |
Schedule & Lecture Notes |
Submit
|
Computer Science A220/P126
Data Structures and Object-Oriented Programming
Spring 2005 |
|
Homework Assignment
06
Trees
Contents:
Overview
Topic: Trees
Related Reading: Ch. 6.1-6.4 of the text, except 6.3.5,
6.4.3 and 6.4.4. Most relevant for these questions will be
6.2.3, 6.2.4 and 6.3.4.
Due:
Wednesday, 13 April 2005, 1:10pm
Please make sure you adhere to the policies on
academic integrity.
Practice Problems
-
Reinforcement Exercise R-6.2
of the text.
-
Reinforcement Exercise R-6.6
of the text.
-
Reinforcement Exercise R-6.12
of the text.
Problems to be Submitted (20 points)
- (6 points)
For the tree in Figure 6.3 (on page 256), what order will nodes be visited
during a postorder traversal?
- (7 points)
Draw a binary tree T such that
simultaneously,
- each node of T stores a single character
- a preorder traversal of T yields BIGZANYCOMPUTER
- an inorder traversal of T yields GIAZNBCYPMTUEOR
- (7 points)
Reinforcement Exercise R-6.19 (page 303)
Extra Credit
- (2 points)
Creativity Exercise C-6.12 of the text.
Michael Goldwasser
CS A220/P126, Spring 2005
Last modified: Thursday, 14 April 2005
Course Home |
Homework |
Programming |
Schedule & Lecture Notes |
Submit