Let f (N) be the average number of full nodes in an N-node binary search tree.
a. Determine the values of f(0) and f (1).
b. Show that for N > 1
c. Show (by induction) that f (N) = (N − 2)/3 is a solution to the equation in part (b), with the initial conditions in part (a).
d. Use the results of Exercise to determine the average number of leaves in an N-node binary search tree.
Exercise
A full node is a node with two children. Prove that the number of full nodes plus one is equal to the number of leaves in a nonempty binary tree.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.