Computer Science EngineeringHard

The height (in edges) of a binary heap that stores 1000 elements is

  1. A. 9
  2. B. 10
  3. C. 8
  4. D. 11

Correct answer: A. 9

The height is floor(log2 1000) = 9 since 2^9 = 512 <= 1000 < 1024.

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic