In a max-heap containing n elements, what is the position of the element with the greatest value?

0
  • n-1
  • n+1
  • n
  • 2*n+1
  • 2*n+2
  • Possibly in any leaf node
  • The leftmost leaf node
  • The rightmost leaf node

Remember this is a max-heap. So where is the biggest element?

It is at the root. So, what position holds the root?