Recall & Review
beginner
What is a binary tree?
A binary tree is a structure where each node has up to two children called left and right. It looks like a family tree with branches splitting into two.
Click to reveal answer
beginner
How do you create a node in a binary tree manually?
You create a node by making an object with a value and two pointers: one for the left child and one for the right child. Both children can be empty (null) if no child exists.
Click to reveal answer
beginner
What does the root node represent in a binary tree?
The root node is the top node of the tree. It is the starting point from where you can reach all other nodes by following left and right children.
Click to reveal answer
intermediate
In TypeScript, how can you define a simple binary tree node type?
You can define it as a type or interface with a value of any type and two optional children nodes: left and right, which can be null or another node.
Click to reveal answer
beginner
Why is it useful to create a binary tree manually?
Creating a binary tree manually helps understand how nodes connect and how trees grow. It is the base for learning tree traversal and other tree operations.
Click to reveal answer
What is the maximum number of children a node in a binary tree can have?
✗ Incorrect
In a binary tree, each node can have at most two children: left and right.
Which node is the starting point of a binary tree?
✗ Incorrect
The root node is the top node and starting point of a binary tree.
In TypeScript, what type can represent a missing child in a binary tree node?
✗ Incorrect
We use null to show that a child node does not exist.
What does a binary tree node usually contain?
✗ Incorrect
A binary tree node contains a value and pointers to left and right children.
Why create a binary tree manually?
✗ Incorrect
Manual creation helps understand how nodes connect and how trees work.
Explain how to create a binary tree manually using nodes with left and right children.
Think about how each node connects to two others or none.
You got /5 concepts.
Describe the role of the root node in a binary tree and how other nodes relate to it.
Imagine the root as the tree trunk from which branches grow.
You got /4 concepts.