Define binary tree.
A tree data structure where each node has at most two children.
What is the height of a tree?
The length of the longest path from the root to a leaf.
True or false: A leaf node has no children.
TRUE
Fill in the blank: A full binary tree has ______ children per node.
Two
What does in-order traversal do?
Visits nodes in the left subtree, then the root, then the right subtree.
Define balanced tree.
A tree where the height of the left and right subtrees differ by at most one.
What is a leaf in a tree?
A node with no children.
True or false: A binary search tree allows duplicate values.
FALSE
What is the root of a tree?
The topmost node in a tree structure.
Fill in the blank: A complete binary tree is fully filled on all levels except ______.
The last level
Define traversal in trees.
The process of visiting all the nodes in a tree.
What is a sibling in a tree?
Nodes that share the same parent.
True or false: A binary tree can be unbalanced.
TRUE
What is the depth of a node?
The number of edges from the tree’s root to the node.
Fill in the blank: The maximum number of nodes at level ‘n’ is ______.
2^n
Define pre-order traversal.
Visits the root node first, then the left subtree, then the right subtree.
What is a binary heap?
A complete binary tree that satisfies the heap property.
True or false: A tree can have cycles.
FALSE
What is the degree of a node?
The number of children a node has.
Fill in the blank: A trie is a type of tree used for ______.
Storing strings
Define post-order traversal.
Visits the left subtree, then the right subtree, then the root node.
What is a subtree?
A tree formed by a node and its descendants.
True or false: Trees can be used to implement priority queues.
TRUE
What is the level of a node?
The number of edges on the path from the root to the node.