A first solution is to successively insert the elements into the heap starting initially from the heap consisting of a single element:
  {
    int i;
    for (i=0; i<n; i++)
        Insert(H,i,H[i]);
  }
Analyzing the complexity of the insertion procedure, we deduce that, in the worst case, the newly inserted value goes up to the root of the tree, so it requires O(h) elementary operations, where h is the height of the heap. A heap being a complete binary tree, its height h will be [log n], so inserting a node into a heap with n elements is of
O(log n).
Let's estimate the worst-case complexity of the heap construction procedure by successive insertions. If all those 2^i values on the level i go up to the root, we get complexity of O(n log n).