369 views
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.

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
Shiv Gaur asked Aug 20, 2018
854 views
In a min heap time complexity for1: Find the 7th smallest element2: Delete the 7th smallest element
0 votes
0 votes
1 answer
2
Rohan Mundhey asked Nov 6, 2016
1,430 views
Consider the following statementsI: The depths of any two leaves in a max heap differ by at most 1. II: Inserting an element into a binary search tree of size n always ta...