Ask Question

What is the time complexity of heap sort?

+3
Answers (1)
  1. 9 March, 11:47
    0
    O (nlogn)

    Explanation:

    Heap sort is a sorting algorithm which makes use of the heap data structure. An array consisting of n elements is first transformed into a heap (O (log n)) and the lowest element is extracted from this heap with restoration of the heap property (O (n)). So the overall time complexity of the entire operation is O (nlogn). For example it the input consists of 10 elements, the time complexity will be O (10log10).
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the time complexity of heap sort? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers