© 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
121
TABLE
I
C
OMPARISONS ON
B
ASIS OF
C
OMPLEXITY AND
O
THER
F
ACTORS
No
Sorting Algorithm
Best Case
Average Case
Worst Case
Stable
1
Bubble Sort
O(n)
O(n*n)
O(n*n)
Yes
2
Selection Sort
O(n*n)
O(n*n)
O(n*n)
No
3
Insertion Sort
O(n)
O(n*n)
O(n*n)
Yes
4
Merge Sort
O(nlogn)
O(nlogn)
O(nlogn)
Yes
5
Quick Sort
O(nlogn)
O(nlogn)
O(n*n)
No
IV.
C
ONCLUSIONS
This paper discusses
well-known sorting algorithms, their code and running time.
In the previous work section,
people have
done a comparative study of sorting algorithms.
Nowadays, some of them compared the running
time of algorithms on real
computers on a different number of inputs which is not much use because the diversity of computing devices is very high. This
paper compares the running time of their algorithms as a mathematical entity and tries to analyse as an abstract point of view.
This paper describes five well-known sorting algorithms and their running time complexity and their stability. To determine the
good
sorting algorithm, the time complexity is the main consideration but other factors include
handling various data types,
consistency of performance, the complexity of code and the stability. From the above discussion, we can conclude every sorting
algorithm has some advantages and disadvantages of their usage and the programmer must choose according to his or her
requirement of sorting algorithms.
Dostları ilə paylaş: