Multiple choice technology programming languages

Of the numbers 12, 23, 9, and 28, which one would be at the top of a properly implemented maxheap?

  1. 28

  2. 9

  3. Any of them could be

  4. None of the Above

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

A max-heap is a binary tree where every parent node is greater than or equal to its children. By definition, the root node (top) contains the maximum element. Among 12, 23, 9, and 28, the value 28 is the largest and would be at the root.