To search, Click below search items.

 

All Published Papers Search Service

Title

Analysis and Comparison of Sorting Algorithms (Insertion, Merge, and Heap) Using Java

Author

Khaznah Alhajri1, Wala Alsinan1, Sahar Almuhaishi1, Fatimah Alhmood1, Narjis AlJumaia1, and Azza.A.A1?

Citation

Vol. 22  No. 12  pp. 197-204

Abstract

Sorting is an important data structure in many applications in the real world. Several sorting algorithms are currently in use for searching and other operations. Sorting algorithms rearrange the elements of an array or list based on the elements¡¯ comparison operators. The comparison operator is used in the accurate data structure to establish the new order of elements. This report analyzes and compares the time complexity and running time theoretically and experimentally of insertion, merge, and heap sort algorithms. Java language is used by the NetBeans tool to implement the code of the algorithms. The results show that when dealing with sorted elements, insertion sort has a faster running time than merge and heap algorithms. When it comes to dealing with a large number of elements, it is better to use the merge sort. For the number of comparisons for each algorithm, the insertion sort has the highest number of comparisons.

Keywords

.Insertion sort, Merge sort, Heap sort, and Sorting algorithms.

URL

http://paper.ijcsns.org/07_book/202212/20221225.pdf