in Programming in C edited by
666 views
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.

in Programming in C edited by
666 views

4 Comments

but why it's  traverse the right child only ???

it is algorithm, you can have your own algorithm 

0
0
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
i already gave one example, why option C is wrong.
0
0

1 Answer

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.

1 comment

exactly… the number of right  nodes of right sub tree. NONE of the option matches
0
0

Related questions