2 votes 2 votes 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. Programming in C data-structures binary-tree + – Vaishnavi01 asked Sep 28, 2018 • edited Mar 11, 2019 by Naveen Kumar 3 Vaishnavi01 673 views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Show 5 previous comments Shaik Masthan commented Sep 28, 2018 reply Follow Share but why it's traverse the right child only ??? it is algorithm, you can have your own algorithm 0 votes 0 votes Magma commented Sep 28, 2018 reply Follow Share Question is really good .but if this question come in gate I definitely tick option C but tell me one thing it's also hold .option C right ??? 0 votes 0 votes Shaik Masthan commented Sep 28, 2018 reply Follow Share i already gave one example, why option C is wrong. 0 votes 0 votes Please log in or register to add a comment.
3 votes 3 votes According to the given algorithm it just calculates total no of right child of right sub tree only which doesnt matches with any of the options given. Priyanka17 answered Sep 28, 2018 Priyanka17 comment Share Follow See 1 comment See all 1 1 comment reply rish1602 commented Jul 19, 2021 reply Follow Share exactly… the number of right nodes of right sub tree. NONE of the option matches 0 votes 0 votes Please log in or register to add a comment.