Whats the difference between this approach and the previous one,ie,using class heap which is O(logn)…and if we can build the heap using O(logn) then why to use this approach O(nlogn).
Answer to this please
hello @garganshul151
no we cannot build complete heap in log(n).
it takes O(n) time to build heap -> proof