Computer Science, asked by Anonymous, 1 month ago

the time require to build max heap using adjust/heapify in worst situation is


plz answer iwill mark u as brainliest

Answers

Answered by krishnjoshi70
2

Answer:

Heap sort is an in-place algorithm. Time Complexity: Time complexity of heapify is O(Logn).

Explanation:

In summary, the work for heap sort is the sum of the two stages: O(n) time for buildHeap and O(n log n) to remove each node in order, so the complexity is O(n log n).

Similar questions