Problem:
Question- Write pseudocode algorithms that take the root of an ordered tree T and, using only the primitive operations supporting the abstract data type Tree - CreateEmptyTree, IsEmptyTree, Root, Parent, LeftmostChild, RightSibling, Label):
Part 1- Computes the number of leaves of the tree T .
Part 2- Decides if the tree T is height-balanced. A tree is height-balanced if for every vertex v of the tree, any two subtrees rooted at v (if they exist) differ in height by at most 1.
Please show all the calculations step by step.