You are on page 1of 3

SORTING ALGORITHM ANALYSIS

Observations:
1. Quick Sort is best for Large number of elements, but it also has highest number of comparisons
2. Merge Sort requires least number of comparisons.
3. Insertion Sort is best for small number of elements irrespective of randomly ordered elements or
sorted elements or reverse sorted element.
4. Tim sort is faster for reverse sorted array than randomly ordered array.
5. Tim sort is fastest among all the sorts.
6. Heap sort is better version of selection sort. It takes same number of comparisons as of merge sort,
but takes more time.

No of Comparisons Graph for Randomly Generated Element


No of
Selection
Insertion
Merge Sort
Quick
Compariso Sort
Sort
Sort
n
10
45
13
18
37
20
190
23
43
158
50
1225
73
145
800
100
4950
136
341
3446
300
44850
462
1254
28480
500
124750
758
2338
77195
1000
499500
1508
5169
313168

heap
sort
35
106
370
936
3669
6805
15589

You might also like