COMPARISON OF QUICK SORT AND HEAP SORT
Abstract
Quick Sort and Heap Sort are two widely used comparison-based sorting algorithms in computer science. This study presents a comparison between Quick Sort and Heap Sort based on their performance, time complexity, memory usage, and practical applications. Quick Sort follows the divide-and-conquer approach by selecting a pivot element and partitioning the array into smaller sub-arrays, making it highly efficient for average-case scenarios with a time complexity of O(nlogn). However, its worst-case complexity can degrade to O(n
2
) when poor pivot selection occurs. Heap Sort, on the other hand, uses a binary heap data structure to maintain order and guarantees a worst-case time complexity of O(nlogn), making it more reliable for large datasets and critical applications.
The comparison further examines factors such as stability, cache performance, recursion overhead, and adaptability to different data sizes. Experimental analysis shows that Quick Sort generally performs faster in practice due to better cache efficiency and lower constant factors, while Heap Sort provides more consistent performance regardless of input distribution. The study concludes that the choice between Quick Sort and Heap Sort depends on application requirements, including speed, memory constraints, and the need for guaranteed performance
Full-Text Access Notice
In accordance with the NERD Policy on promoting peer-reviewed publication, public access to the full text of a project, thesis or dissertation is restricted for three years, allowing the author and supervisors sufficient time to pursue peer-reviewed publication.
During this period, researchers with legitimate academic or research purposes may request authorisation directly from the author to enable NERD to release the indexed full texts of the work using the form below.