Multiple choice

Consider a binary max-heap implemented using an array.

Which one of the following array represents a binary max-heap?

  1. {25,12,16,13,10,8,14}

  2. {25,14,13,16,10,8,12}

  3. {25,14,16,13,10,8,12}

  4. {25,14,12,13,10,8,16}

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

If the value presented at any node is greater than all its children then thr tree is called max heap