Although QuickSort works better in practice, the advantage of HeapSort worst case upper bound of O(nLogn).

MergeSort also has upper bound as O(nLogn) and works better in practice when compared to HeapSort. But MergeSort requires O(n) extra space

HeapSort is not used much in practice, but can be useful in real time (or time bound where QuickSort doesn’t fit) embedded systems where less space is available (MergeSort doesn’t fit). Please refer IntroSort for example

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Heap Sort for decreasing order using min heap
- Convert min Heap to max Heap
- Comparison among Bubble Sort, Selection Sort and Insertion Sort
- C++ Program for Heap Sort
- Java Program for Heap Sort
- Python Program for Heap Sort
- Python Code for time Complexity plot of Heap Sort
- Lexicographical ordering using Heap Sort
- Sorting algorithm visualization : Heap Sort
- Know Your Sorting Algorithm | Set 1 (Sorting Weapons used by Programming Languages)
- Least Frequently Used (LFU) Cache Implementation
- Introduction to Data Structures | 10 most commonly used Data Structures
- Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists?
- Odd-Even Sort / Brick Sort
- Bucket Sort To Sort an Array with Negative Numbers
- Sort all even numbers in ascending order and then sort all odd numbers in descending order
- Serial Sort v/s Parallel Sort in Java
- Program to sort an array of strings using Selection Sort
- C/C++ Program for Odd-Even Sort / Brick Sort
- Java Program for Odd-Even Sort / Brick Sort