Computer Science I / Trees and Hierarchical Storage
Practice question · Select all that apply

Select every statement the lesson supports about binary search trees.

Hints
  1. One option promises something the lesson explicitly denies.
  2. Ask what happens to the height when the values arrive already sorted.
Show the answer
  • A. Self-balancing trees exist to keep the height logarithmic
  • B. An in-order traversal of a BST produces the values in sorted order
  • D. Inserting already-sorted data degenerates the tree into a chain
  • E. The ordering invariant lets a search discard half the remaining tree at each step
Why

The invariant, the degeneration, the sorted traversal and the purpose of self-balancing trees are all stated. The false option is the guarantee: logarithmic cost holds only when the tree is balanced, and sorted input destroys that balance, asserting the guarantee unconditionally is the exact pitfall the lesson names.

Read the lesson: Trees and Hierarchical Storage →

Practise Trees and Hierarchical Storage

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Trees and Hierarchical Storage