CS-211 Fall 2015 Lab 09 report Due: Nov. 13, 2015
Name:
1. After reading input.txt, what number appears twice in the input list?
2. Would your tree program work if there were 43 number read from stdin? What about 254? Or 110,304?
What limits the number of items your tree program can handle?
3. Does the number of nodes we create (and eventually free) in the tree program differ from the number
of nodes we needed for the llist program? If so, why?
4. Does the size of a single tree node (instance of a tnode structure) differ from the size of a
linked list node (instance of an lnode structure we used last week? If so, what is the difference in
bytes?
5. When we inserted a node into a linked list, we needed to compare the input value to a number of
different nodes in the linked list already. When we insert a node into an ordered tree, we also have
to compare the input value to a number of different nodes in the ordered tree already. Does the
number of compares for the linked list differ, in the average case, from the number of compares for
the tree? If so, which is usually the smaller number?