Comparative Analysis of Sorting Algorithms: A Review
Mohammed Alaa Ala’anzy, Zhanar Mazhit, Alaa Fadhil Ala’Anzy, Abdulmohsen Algarni, Ramis Akhmedov, Abdiyev Bauyrzhan
Abstract
In the realm of computer science, sorting algorithms play a pivotal role in optimising data organisation and retrieval processes across various applications. This paper presents a comprehensive examination and comparative analysis of the most commonly used sorting algorithms, focusing on their time, space complexity, and efficiency. By scrutinising both traditional methods like bubble sort, selection sort, and insertion sort, and advanced techniques such as merge sort, quick sort, heap sort, and radix sort, this study sheds light on the performance metrics of each algorithm. Through meticulous implementation and evaluation across datasets of varying magnitudes, ranging from 100 to 100,000 integers, the research provides valuable insights into the strengths and weaknesses of these sorting techniques. The outcomes of this study offer practical guidance for professionals in data engineering and software development, aiding in the informed selection of sorting algorithms tailored to specific application needs. Utilising a rigorous experimental setup with the pseudocode, the study meticulously measures the time complexity of each algorithm, recording CPU time in seconds. The analysis reveals significant performance differentials among the algorithms, showcasing the efficiency of quick sort, shell sort, and heap sort on small datasets, while highlighting the scalability of merge sort, radix sort, and quick sort as dataset sizes increase. This research contributes to the advancement of algorithmic knowledge and provides a valuable resource for practitioners seeking to optimise sorting processes in their computational tasks.