© 2020 IJRAR September 2020, Volume 7, Issue 3 www.ijrar.org (
E-ISSN 2348-1269, P- ISSN 2349-5138
)
IJRAR19L2026
International Journal of Research and Analytical Reviews (IJRAR)
www.ijrar.org
120
Fig. 5.1 Example of Quick Sort [14]
III.
C
OMPARISON ON THE BASIS OF COMPLEXITY AND OTHER FACTOR
In this paper, there are two classes of Sorting Algorithms:
1.
O(n*n):
a.
Bubble Sort
b.
Selection Sort
c.
Insertion Sort
2.
O(n log n )
a.
Merge Sort
b.
Quick Sort
In best-case conditions (if the list is already in sorted order), the bubble sort can approach a constant O(n) level of complexity,
while the insertion sort and selection
sorts also have complexities; they are significantly more efficient than bubble sort. The
quick sort is a massively recursive sort. It can be said as merge sort is the faster version of quick sort.
This paper describes five well known sorting algorithms and their running time and stability which is given in the below Table
1. This table gives the comparison of time complexity or running time of different sorting algorithms
and the stability in the
precise manner
.
Dostları ilə paylaş: