Zebra0.com

MCC++ Project: Linked Lists

C++ Project: Linked Lists

Using a Binary Tree

You are to create a binary tree class template to create a tree. You should include test data that shows at least 3 examples: Strings, integers, Box, Fraction, etc. The tree is ordered by the overloaded operators. Be sure that the necessary comparison have been overlaoed in the class.

You may want to modify the linked list class to implement the tree. A tree simply has two links instead of one. tree

This should be done recursively: insert a person into the tree. If the tree is empty, put the person as the root of the tree. Otherwise insert the person into either the left (if the name of the new person comes before the name at the root) or right subtree otherwise.

Read this for an example of a template.

This web site, and all pages therein, are the sole property and responsibility of Zebra0.com.
It is not endorsed, sponsored, or provided by or on behalf of Montgomery College.