185k views
5 votes
What is the root of the tree?

1 Answer

3 votes

Answer:

root is an ancestor of all other nodes in a tree.

Step-by-step explanation:

Root is a special node in the tree which is an ancestor of all other nodes.For example, consider a binary tree with root R. Let C1,C2 be the children of R at level 1. Similarly, C11,C12 are the children of C1 at level 2 and C21,C22 are the children of C2 at level 2. Now the parent of C22 is C2 and the parent of C2 is root R. Similar is the case for all other child nodes. Hence, Each node in the tree will have the root node R as its ancestor.

User Lifewithelliott
by
5.0k points