NEW
Font size
WorksheetsBinary Tree Concepts Quiz
Total questions: 40
Worksheet time: 20mins
Which traversal method is most suitable for reconstructing a binary tree when combined with in-order traversal?
Pre-order
Post-order
Level-order
Any traversal
In an expression tree, what does each leaf node typically represent?
An operator
A variable or constant
A mathematical function
A group of sub-expressions
Which of the following is true about an operator node in an expression tree?
It holds a variable
It performs a computation on two child nodes
It does not have children
It only stores numeric values
What is typically stored in the internal (non-leaf) nodes of an expression tree?
Constants
Variables
Operators
Parentheses
Which of the following is an example of an expression tree for the expression (3+2)×5?
The root is ×, with children + and 5.
The root is +, with children 3 and 2.
The root is +, with children × and 5.
The root is ×, with children 3 and 2.
What type of binary tree is structured to maintain a sorted order?
Full Binary Tree
AVL Tree
Binary Search Tree (BST)
Complete Binary Tree
Which binary tree ensures the left and right subtrees of any node differ in height by at most 1?
Red-Black Tree
Complete Binary Tree
AVL Tree
Perfect Binary Tree
In a complete binary tree, all levels except possibly the last are...
Completely empty
Filled arbitrarily
Completely filled from left to right
In reverse order
What is a full binary tree?
A binary tree where each level has exactly one node
A binary tree with at least one child per node
A binary tree where the root has no children
A binary tree where every node has 0 or 2 children
What type of binary tree is used to implement heaps?
Full Binary Tree
AVL Tree
Complete Binary Tree
Red-Black Tree
Which type of binary tree is also known as a balanced binary search tree?
Complete Binary Tree
Full Binary Tree
AVL Tree
Heap
What type of binary tree has all leaf nodes at the same level?
AVL Tree
Red-Black Tree
Perfect Binary Tree
Full Binary Tree
What type of binary tree is commonly used in memory management?
Binary Search Tree
Binary Heap
Complete Binary Tree
Perfect Binary Tree
Which binary tree balances itself after insertion or deletion of nodes?
Complete Binary Tree
AVL Tree
Full Binary Tree
Heap
What is the property of a Red-Black Tree?
Every node has exactly two children.
Nodes are either red or black.
All levels except the last are filled left to right.
Nodes can only be black.
What is the term for a node that has no children?
Parent node
Leaf node
Root node
Sibling node
Which traversal method visits nodes in the order: root, left subtree, right subtree?
Level-order
In-order
Pre-order
Post-order
What is the maximum number of children a node in a binary tree can have?
Unlimited
1
2
3
Which of the following is true about a binary search tree (BST)?
There are no specific rules for node placement.
All left subtree values are greater than the root.
All right subtree values are smaller than the root.
Left subtree values are smaller, and right subtree values are greater than the root.
What is a binary tree?
A tree with only leaf nodes
A tree with no root
A tree with at most two children per node
A tree with at least three children per node
In a binary tree, if a node has one child, which of the following is true?
It is the root node.
It is a leaf node.
It has exactly two children.
It can have either a left or right child, but not both.
What is the typical behavior when inserting a node into a binary tree that already has two children?
The tree is reorganized to fit the new node.
The node is not inserted.
It looks for the next available position using level-order traversal.
The node replaces one of the children.
How is a node created in a binary tree?
By setting it as the root of the tree.
By adding it to an array.
By traversing the tree.
By initializing it with a value and setting its left and right pointers to null.
What is true about inserting a new node in a binary tree?
The new node is placed only in the left subtree.
The tree must always remain complete after insertion.
The insertion position is determined arbitrarily.
The new node is always a leaf node.
What is tree traversal?
Deleting nodes from a tree
Balancing a tree
Rearranging the nodes of a tree
Visiting all the nodes of a tree in a specific order
Which traversal method visits the root node before its subtrees?
Post-order
In-order
Pre-order
Level-order
In which traversal is the root visited last?
Level-order
In-order
Pre-order
Post-order
Which traversal visits the left subtree, then the root, and finally the right subtree?
Pre-order
In-order
Post-order
Level-order
What is the order of nodes visited in pre-order traversal?
Right subtree, root, left subtree
Left subtree, root, right subtree
Root, left subtree, right subtree
Root, right subtree, left subtree
Which traversal is also known as depth-first search (DFS)?
Pre-order
Level-order
In-order
Post-order
Which data structure is typically used for iterative tree traversal?
Linked list
Queue
Stack
Array
In post-order traversal, which part of the tree is visited first?
Right subtree
Any subtree
Root
Left subtree
Which traversal method processes nodes level by level?
Pre-order
Post-order
In-order
Level-order
What is the order of nodes visited in in-order traversal for a binary search tree?
Ascending order
Descending order
Random order
None of the above
What type of traversal is used to evaluate expressions in an expression tree?
In-order
Pre-order
Post-order
Level-order
Which type of binary tree is used in Huffman encoding?
Binary Search Tree
Complete Binary Tree
AVL Tree
Full Binary Tree
What is the key property of a Binary Search Tree (BST)?
All levels are completely filled.
Each node has exactly two children.
Left child values are smaller, and right child values are larger than the root.
Nodes can only have integer values.
What happens when you insert a value into a BST that is smaller than the root?
It is placed in the right subtree.
It replaces the root.
It is not allowed.
It is placed in the left subtree.
Where is a value placed if it is greater than the root in a BST?
At the root
In the left subtree
In the right subtree
It is ignored.
Which traversal order can be used to check if a BST is correctly sorted?
In-order
Pre-order
Post-order
Level-order
