CSE373 Autumn 2007
CSE logo University of Washington Computer Science & Engineering
 CSE373 Autumn 2007

Assignments
 Homework 1
 Homework 2
 Homework 3 part 1
 Homework 3 part 2
 Homework 4
 Homework 5
 Homework 6
Exams
 Final Exam
 Midterm 1
 Midterm 2
Administrative
 Home
 Mailing List
 Message Board
 Annoucement Archive
 Anonymous Feedback
 Mail Instructor & TAs
Lectures
 Calendar & Slides
Handouts
 Course Info & Syllabus
Policies
 General Guidelines
 Grading Policies
 Programming Guidelines
 Writen HW Guidelines
Computing
 JDK 1.6
 Eclipse
 Programming Lab Info
   

CSE373 Data Structures Au07, Homework 3 - Part 1

Due at the begining of the Monday's class, October 29th.

Please submit the electronic copy of your assignment here and bring the hardcopy to the class. No late assignments will be accepted.

Here are some questions on trees. You only need to turn in written solutions.

Problems

  1. Binary search trees
    1. Draw a picture of the integer-valued BST that results when these values are inserted in this order: 7, 16, 11, 3, 6, 8, 17, 45, 12.
    2. Which nodes are the leaves of this tree? Which node is the root?
    3. What is the depth of the node containing 3? What is the height of the node containing 7?
    4. Write down the order in which the node values are reached by (i) a preorder, (ii) an inorder, and (iii) a postorder traversal of the tree.
    5. Draw the sequence of trees that result if we perform these operations successively on the original tree from part (a): add(9), delete(17), add(13), delete(7).
  2. Weiss, 4.19.
  3. Weiss, 4.27.
  4. Weiss, 4.28.