

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Program 1 Due September 8 , 2008 This assignment assumes that you have written binary tree routines. If it has been several years since you took CS 1410, you need to get started immediately. A general tree is a tree in which the number of children is not restricted to two. The problem with a general tree is that if we use an array to store the children pointers, we need to know a maximum number of children. A more flexible solution (and one that requires less pointer space) stores the tree as a “left most child” and “next right sibling.” Instead of storing pointers to all children, a node only stores a pointer to it’s leftmost child. That child stores a pointer to its next right sibling. See the example below. For this assignment, you are to complete the following:
t 4 a 1 e 0 b 3 f 0 g 0 h 2 o 0 p 0 c 1 i 0 d 5 j 0 k 3 q 0 r 0 s 0 l 0 m 0 n 0