Sunday 29 April 2012

Comparative Study of Array Sorting Techniques


----------------------------------------------------------
Algorithm       |    Comparisons     |    Moves
----------------------------------------------------------

----------------------------------------------------------
DataSet 1: 1    2    3    4    5    6    7    8    9    10  

Insertion Sort  |    45         |    0
Selection Sort  |    45         |    0
Bubble Sort     |    45         |    0
EEBubble Sort   |    9          |    0
Shaker Sort     |    9          |    0
Shell Sort      |    62         |    0
Heap Sort       |    80         |    90
Quick Sort      |    25         |    0

----------------------------------------------------------
DataSet 2: 10   9    8    7    6    5    4    3    2    1   

Insertion Sort  |    9          |    54
Selection Sort  |    45         |    15
Bubble Sort     |    45         |    135
EEBubble Sort   |    45         |    135
Shaker Sort     |    45         |    135
Shell Sort      |    62         |    39
Heap Sort       |    67         |    63
Quick Sort      |    25         |    15

----------------------------------------------------------
DataSet 3: 10   1    2    3    4    5    6    7    8    9   

Insertion Sort  |    45         |    18
Selection Sort  |    45         |    27
Bubble Sort     |    45         |    27
EEBubble Sort   |    17         |    27
Shaker Sort     |    17         |    27
Shell Sort      |    62         |    27
Heap Sort       |    71         |    81
Quick Sort      |    45         |    27

----------------------------------------------------------
DataSet 4: 10   2    3    4    5    6    7    8    9    1   

Insertion Sort  |    37         |    26
Selection Sort  |    45         |    3
Bubble Sort     |    45         |    51
EEBubble Sort   |    45         |    51
Shaker Sort     |    24         |    51
Shell Sort      |    57         |    41
Heap Sort       |    75         |    81
Quick Sort      |    25         |    3

----------------------------------------------------------
DataSet 5: 10   1    3    4    5    6    7    8    9    2   

Insertion Sort  |    38         |    25
Selection Sort  |    45         |    6
Bubble Sort     |    45         |    48
EEBubble Sort   |    45         |    48
Shaker Sort     |    24         |    48
Shell Sort      |    57         |    38
Heap Sort       |    75         |    78
Quick Sort      |    25         |    6

----------------------------------------------------------
DataSet 6: 2    1    4    3    6    5    8    7    10   9   

Insertion Sort  |    45         |    10
Selection Sort  |    45         |    15
Bubble Sort     |    45         |    15
EEBubble Sort   |    17         |    15
Shaker Sort     |    17         |    15
Shell Sort      |    62         |    15
Heap Sort       |    78         |    87
Quick Sort      |    23         |    15

No comments:

Post a Comment

Your comments are very much valuable for us. Thanks for giving your precious time.

Do you like this article?