A. Total no. of trees that were there in the forest.
B. Total no. of nodes in the forest.
C. Total no. of nodes which have only right child.
D. Return max element among all nodes.
but why it's traverse the right child only ???
it is algorithm, you can have your own algorithm
64.3k questions
77.9k answers
244k comments
80.0k users