CS 2401 Assignment #11
Due Dates: December
1 or 2, depending on the day of your lab.
Objective: The goal of this assignment is to practice
trees.
Assignment: write the following three methods:
- a method that, given a tree, returns the number of its leaves
(i.e., nodes without children);
- a method that, given a tree, returns the number of
nodes that have exactly one child;
- a method that, given a tree, returns the number of
nodes that have exactly two children.
Test each of your methods on two examples of binary search trees.