Questions: Binary Tree Properties: Height, Balance, Completeness

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

You insert the values 1, 2, 3, 4, 5 into a plain (non-self-balancing) binary search tree in that order. What is the height of the resulting tree?

A2 — BSTs automatically balance themselves during insertion
B3 — each level contains one more node than the previous
C4 — each node becomes the right child of the previous, forming a degenerate chain
DThe height depends only on the number of nodes, not the insertion order
Question 2 Multiple Choice

Which of the following best explains why a complete binary tree can be stored in an array without pointers?

AThe left-to-right filling rule ensures node i always has children at indices 2i+1 and 2i+2, with no gaps in the array
BComplete trees have no wasted memory because every level is fully filled
CArray storage works for any binary tree; complete trees are not special in this regard
DComplete trees are stored by writing the in-order traversal into consecutive array slots
Question 3 True / False

A binary tree with n nodes typically has height O(log n).

TTrue
FFalse
Question 4 True / False

A complete binary tree has all levels fully filled except possibly the last, which is filled from left to right.

TTrue
FFalse
Question 5 Short Answer

Why does the height of a binary tree matter for algorithm performance, and what is the worst-case height of a plain binary search tree with n nodes?

Think about your answer, then reveal below.