Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
26.1. Trees
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the topmost node of a tree called?
Hint
Think of where the tree begins.
- 2.
What do you call a node that has no children?
Hint
Consider what happens if you can't go further down from that point.
- 3.
What defines a node as a leaf in a tree structure?
- A node with multiple children
- A node with no children
- A root node
Hint
Remember the basic structure of tree nodes.
- 4.
True or False: In a binary search tree, the left subtree contains values greater than the parent node.
- True
- False
Hint
Recall how values are organized in a binary search tree.
- 5.
Consider the following set of numbers: 15, 10, 20, 8, 12, 17, 25. Construct a binary search tree and demonstrate the in-order traversal output.
Hint
Focus on the rules of left and right placements based on value.
- 6.
Explain how you would implement a priority queue using a heap. What advantages does using a heap provide?
Hint
Consider the properties of heaps regarding parent and child relationships.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting