ProgrammingHard

A heap of 15 nodes stored as an array (complete binary tree) has what height, counting levels from 1?

  1. A. 3
  2. B. 5
  3. C. 15
  4. D. 4

Correct answer: D. 4

A complete tree with 15 nodes has 4 full levels: 1, 2, 4 and 8 nodes.

More C Programming questions

Exams that ask this topic