Questions: Binary Trees

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A programmer inserts one million records into a binary tree in sorted ascending order. Search operations are far slower than expected — comparable to a linked list. What is the most likely cause?

ABinary trees cannot store sorted data; the records should have been stored in a hash table
BInserting in sorted order creates a degenerate tree where each node has only one child, giving height n instead of log₂(n)
CThe tree exceeded its memory allocation and switched to disk-based storage
DBinary tree search is inherently O(n) for datasets above a certain size
Question 2 Multiple Choice

A binary tree has 7 nodes arranged so every level is completely filled. What is the height of this tree (measured as the depth of the deepest node, with the root at depth 0)?

A7 — one unit of height per node
B3 — the number of fully filled levels
C6 — the depth of the deepest node counted starting from 1
D2 — the depth of the deepest node counted starting from 0
Question 3 True / False

The height of a node in a binary tree is defined as its distance from the root.

TTrue
FFalse
Question 4 True / False

A full binary tree (most node has 0 or 2 children) is typically also a complete binary tree (most levels filled left-to-right).

TTrue
FFalse
Question 5 Short Answer

Why does the shape of a binary tree — balanced versus degenerate — matter so much for the performance of operations like search and insertion?

Think about your answer, then reveal below.