Task 1: Fill out Survey
Please take the 122/223 survey at survey.osble.org/index.php?sid=97282. Please treat the question asking about 122 as if it were asking about taking 223. Note that this survey is different from the end of semester course evaluation survey. When you finish this survey, please have the TA check you off.
Task 2: Binary Search Tree Exercises
In the past, students often feel conceptually comfortable with BSTs, but often have difficulties actually using them in code. The following mini exercises are intended to give you exposure to working with BSTs in code. Inside of the BinarySearchTree class (look for the TODO items), complete the following functions:
1. Write a function called getHeight() that returns the height of a given binary tree.
a. Recall that the height is simply the maximum depth of the tree.
2. Write a function called getNumberOfLeafNodes() that returns the number of leaf nodes in the tree
3. Write a function called countSmallerThan() that returns the number of nodes whose values are smaller than the supplied input paramter
4. Write a function called outputRange() that returns, in sorted order, a string of nodes whose values are between a supplied range.
Sample Output
Download:- starter_code.rar