Binary Search Trees - A collection of Functions
COM1201 Spring 1999
Programming Assignment 3
You will implement five recursive member functions of a Binary Search Tree class. Functions to build and draw the tree are already provided. You will implement:
- int NumNodes()
Returns the number of nodes in the tree.
- int NumLeaves()
Returns the number of leaves in the tree.
- int Height()
Returns the number levels in the tree.
- bool Search(Datatype D)
Returns true if D is the data value at some node of the tree.
- Datatype Entry(int num)
Returns the numth data value in the tree, in alphabetical order.
Due Monday May 17, 1999
Last Updated: May 9, 1999 7:29 pm by
Harriet Fell
College of Computer Science, Northeastern University
360 Huntington Avenue #161CN,
Boston, MA 02115
Internet: fell@ccs.neu.edu
Phone: (617) 373-2198 / Fax: (617) 373-5121
The URL for this document is:
http://www.ccs.neu.edu/home/fell/COM1101/HW/PROG/BSTree.html