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.


Take a Study Break

Green YOUR SCHOOL!

Click here to get involved with dosomething.org!

John Krasinski's BIG MIRACLE

Click to watch the trailer and read exclusive star interviews!

Do you like Anna?

Read Dear Albert... from ANNA's perspective!

BATTLESHIP, the movie

Here's why we're super jazzed about it.

Do energy juices actually work?

Our blogger puts 'em to the test!


The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps