title: Creating a Min heap or a Max heap
body: <blockquote>
    <p>For creating a Min heap or a Max Heap of n elements, time taken would be O(nlogn) for creating a heap. Because, every insertion takes O(logn) time and hence n elements would take O(nlogn) time</p>
  </blockquote>
  
  <p>But in many places it is written that the creation of a heap can be optimized to O(n) time i.e. a linear time?But it is not clearly explained how?</p>