title: Time complexity to get min elements from max-heap
body: <p>I was asked in an interview:</p>
  
  <blockquote>
    <p>What is the best time complexity in getting the min element(s) from a max-heap?</p>
  </blockquote>
  
  <p>I replied as O(1) assuming the heap size is known and the heap is implemented as a binary heap using an array. This way as per my assumption, the min value is at <code>heap_array[heap_size]</code>.</p>
  
  <p>My question is that if this answer is correct. If not, what is the correct answer?</p>