Ask Question
27 June, 05:52

What is the time complexity of heap sort?

+3
Answers (1)
  1. 27 June, 07:46
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers