2 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 1.6k views answer comment Share Follow Print See all 8 Comments 8 8 Comments reply Show 5 previous comments Shaik Masthan commented Sep 28, 2018 reply Follow flag but why it's traverse the right child only ??? it is algorithm, you can have your own algorithm 0 0 replyShare Magma commented Sep 28, 2018 reply Follow flag 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 0 replyShare Shaik Masthan commented Sep 28, 2018 reply Follow flag i already gave one example, why option C is wrong. 0 0 replyShare Please log in or register to add a comment.
2 2 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 1 1 comment reply rish1602 commented Jul 19, 2021 reply Follow flag exactly… the number of right nodes of right sub tree. NONE of the option matches 0 0 replyShare Please log in or register to add a comment.