Implementation of Trees


Implementing Tree

When we say a tree, we are talking about a way to structure data. The term tree on its own does not necessarily indicate one specific way of implementing this structure. Instead it just says that however we implement it, our implementation must allow for the data to be thought of in the general way that a tree structures data, as described in Section I.

This means that it will be up to you to decide exactly how to implement your trees using C Code. What all this means is that you will need to define some type in your code for a tree, of which you can then make variables. We will discuss a few very different approaches, such as one that uses structs and pointers and another that simply uses an ordinary array. The first of these two ways is the more generally used technique; the second is included more as an exercise in seeing how to use one data structure, the array, to implement a radically different structure, the tree.

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