# Where is Heap Sort used practically?

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

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.

## Recommended Posts:

- Heap Sort for decreasing order using min heap
- C++ Program for Heap Sort
- Python Program for Heap Sort
- Java Program for Heap Sort
- Lexicographical ordering using Heap Sort
- Python Code for time Complexity plot of Heap Sort
- Convert min Heap to max Heap
- Comparison among Bubble Sort, Selection Sort and Insertion Sort
- Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists?
- Add elements in start to sort the array | Variation of Stalin Sort
- Program to sort an array of strings using Selection Sort
- Bucket Sort To Sort an Array with Negative Numbers
- Insertion sort to sort even and odd positioned elements in different orders
- Sort an Array which contain 1 to N values in O(N) using Cycle Sort
- Serial Sort v/s Parallel Sort in Java
- Odd Even Transposition Sort / Brick Sort using pthreads
- Java Program for Odd-Even Sort / Brick Sort
- K-ary Heap
- Max Heap in Java
- Convert BST to Min Heap