Algorithms and Data Structures · Junior · Question 47 of 75
What is a leaf in a tree?
- 1The root node
- ✓Correct answer: A node without children
- 3A node with exactly two children
Explanation
Leaves are the end points of the hierarchy: files in a folder tree, text nodes in the DOM. The root is the only node without a parent.
Test yourself
Take the Algorithms and Data Structures · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.
Take this quiz