Multiple choice

Let the binary heap has depth equal to d. What is the minimum number of nodes in the heap?

  1. 2d+1 -1

  2. 2d+1

  3. 2d

  4. 2d -1

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In a binary heap, the minimum number of nodes for a given depth d occurs when all levels up to d-1 are completely filled and the last level has only a single node. The formula for the minimum nodes for depth d is 2^d.