20. The concept of best-, worst-, and average-case analyses extendsbeyond algorithms to other counting problems in mathematics. Recallthat the height of a binary tree is the number of edges in thelongest path from the root to a leaf.
(a) Find the best-case height of a binary tree with fivenodes.
(b) Find the worst-case height of a binary tree with fivenodes.
(c) Find the average-case height of a binary tree with five nodes.For this problem, you will have to list all possible binary treeswith five nodes. Assume that each of these is equally likely tooccur.
(d) Find the worst-case height of a binary tree with n nodes. (e)Approximate the best-case height of a binary tree with nnodes.