Ask Question
22 August, 04:11

What is the time complexity of heap sort?

+5
Answers (1)
  1. 22 August, 07:42
    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?
Get an answer to your question ✅ “What is the time complexity of heap sort? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers