Recall & Review
beginner
What is the root of a tree?
The root is the topmost node of a tree. It has no parent and is the starting point of the tree.
Click to reveal answer
beginner
Define a leaf node in a tree.
A leaf node is a node that has no children. It is at the end of a branch.
Click to reveal answer
intermediate
What does the height of a node represent in a tree?
Height of a node is the number of edges on the longest path from that node down to a leaf.
Click to reveal answer
intermediate
Explain the depth of a node in a tree.
Depth of a node is the number of edges from the root node down to that node.
Click to reveal answer
beginner
What is the level of a node in a tree?
Level of a node is its depth plus one. The root is at level 1, its children at level 2, and so on.
Click to reveal answer
Which node in a tree has no parent?
✗ Incorrect
The root node is the only node without a parent.
What is true about a leaf node?
✗ Incorrect
Leaf nodes have no children; they are at the ends of branches.
The height of a node is the number of edges from the node to:
✗ Incorrect
Height counts edges down to the farthest leaf from that node.
Depth of a node is measured from:
✗ Incorrect
Depth counts edges from the root down to the node.
If a node is at depth 3, what is its level?
✗ Incorrect
Level is depth plus one, so 3 + 1 = 4.
Describe the difference between root, leaf, height, depth, and level in a tree.
Think about where the node is in the tree and how far it is from root or leaves.
You got /5 concepts.
Explain how you would find the height and depth of a node in a tree.
Imagine climbing up and down the tree from the node.
You got /4 concepts.