CS 107 S01 Homework 5

Due Monday 5/7 at the beginning of class

No late assignments will be accepted

Only problem 1 is to be implemented. The others are pencil and paper exercises.

  1. (50 points) #17, page 509. (Minimax tree)
    For the hard copy use the data in Fig. 10-44 on page 510.
  2. (10 points) Give the preorder, inorder and postorder traversals of the binary trees in Fig. 10-42 (page 506) and Fig. 10-44 (page 510).
  3. (20 points) In a K-ary tree, each node may have up to K children. The children are called, resperctively, the first, second, ..., Kth child of the tree. (A 2-ary tree is a binary tree.) What is the maximum number of nodes a K-ary tree of height H can have?
  4. (10 points) #3 page 506. (Binary Search Tree traversal)
  5. (10 points) #4 page 506. (BInary search Tree insertion)