Home > SparkNotes > Computer Science Study Guides > Implementation >

sparknotes

Implementation of Trees


Problems 1

Problem : As discussed above, each node in our implementation contains an integer as the only data element. Rewrite the typedef so that it contains age (an int) as one field and a string name as the other.


Problem : With the old definition, declaring a variable to be a tree_t allocated all of the space for the tree and its data, is that still true with the new definition? Explain.


Problem : Describe what you know about the values of the fields for a leaf node in this implementation.