Here is a data file that contains 2500 four digit numbers. No values are repeated. Put the values straight into a binary search tree and report the height. Then use the balancing method we discussed in class to partially balance the tree. Report the height again. Example output of your program might be:
Initial tree height = 29 Height after balancing = 16Note that the optimal height of a binary tree with 2500 nodes would be 12, since log2 2500 = 11.2877. However, our rotate functions are pretty rough, so getting close to 12 is good enough.