What node is the root node? Which nodes are leaf nodes/terminal nodes? For each
ID: 3544266 • Letter: W
Question
What node is the root node?
Which nodes are leaf nodes/terminal nodes?
For each node, specify:
- Node child
- Node siblings
- The Size of the node' sub tree
- The height of the node
- The depth of the node
Also, write the node in the tree in these orders:
- PreOrder
- InOrder
- PostOrder
- levelOrder
Explanation / Answer
What node is the root node?
ans: A
Which nodes are leaf nodes/terminal nodes?
F J I M L G
- Node child
are
node A has child B C and node B has a child D E and so on
- Node siblings are that
The Size of the node' sub tree
- The height of the node
The height of a node is the number of nodes on the longest path from the node to a leaf
- The depth of the node
The depth of a node is the number of edges from the node to the tree's root node.
For example, when looking at the root node of the tree, the depth would be 0 and the height would be the number of nodes on the longest path to a leaf.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.