Quote:
Can someone plz explain me max-heap building in O(n) time?
Extremely simple, you don't. It does not exist.
Technically, it is O(n)=n, and this means that you need a fixed amount of work/time to get the final position in the heap.
For O(n)=n log n, this means that the amount of work/time needed to get the final position depends on the amount of data already in heap.
[Update]
In fact, it is possible for the very restricted conditions as explained in solution 3.