0 votes 0 votes Why do we need a Build Heap procedure ? if we want to build a heap, we will call max_heapify on root node and we will form a heap in O(log N) TC. if we use build heap, it will take O(N) TC, what is the use im not getting ? please explain. akshayaK asked Dec 21, 2018 akshayaK 369 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply srestha commented Dec 21, 2018 reply Follow Share without build heap , time complexity of heap sort is $O(nlogn)$ but with build heap TC= $O(n)$ 0 votes 0 votes akshayaK commented Dec 21, 2018 reply Follow Share are we not able to build heap in one go, if we call max_heapify on root node which leads to O(log N) TC 0 votes 0 votes srestha commented Dec 21, 2018 reply Follow Share heapify and heap sort is different 0 votes 0 votes akshayaK commented Dec 21, 2018 reply Follow Share yes mam, im asking about max_heapify and build_heap we are using max_heapify in build_heap. i want to know : by only using max_heapify(), are we not able to form a heap which satisfies heapify property ? we will call max_heapify on root, and in one go we can form a heap in O(log N) rather than O(N) if build_heap is used ? 0 votes 0 votes Please log in or register to add a comment.