A Comparative Study of Cocktail Sort and Insertion Sort

Sorting is one of the basic operations in Computer Science. This operation is often used to meet a variety of requirements, such as processing and sorting data. It is challenging to find the desired information in unsorted data. This is the reason why there are plenty of sorting algorithms exist to...

Full description

Bibliographic Details
Main Authors: Carissa KOMALASARI, Wirawan ISTIONO
Format: Article
Language:English
Published: Stefan cel Mare University of Suceava 2021-04-01
Series:Journal of Applied Computer Science & Mathematics
Subjects:
Online Access:https://jacsm.ro/view/?pid=31_3
_version_ 1828794086919766016
author Carissa KOMALASARI
Wirawan ISTIONO
author_facet Carissa KOMALASARI
Wirawan ISTIONO
author_sort Carissa KOMALASARI
collection DOAJ
description Sorting is one of the basic operations in Computer Science. This operation is often used to meet a variety of requirements, such as processing and sorting data. It is challenging to find the desired information in unsorted data. This is the reason why there are plenty of sorting algorithms exist to find the most efficient algorithm. This study compares the efficiency level of Cocktail sort and Insertion sort. The efficiency level measured by the execution time or the CPU usage time. Both algorithms were tested to sort a certain amount of random data with variation amount of data. The amount of data that will be used in this research is 1500, 3000, 4500 and 6000 data using C language. After testing and comparing the two algorithms, cocktail sort and insertion sort, the results shows that, the Insertion sort algorithm is proven to be more efficient and faster than the Cocktail sort algorithm.
first_indexed 2024-12-12T03:39:08Z
format Article
id doaj.art-241ab772dd82467485557a70d15a390b
institution Directory Open Access Journal
issn 2066-4273
2066-3129
language English
last_indexed 2024-12-12T03:39:08Z
publishDate 2021-04-01
publisher Stefan cel Mare University of Suceava
record_format Article
series Journal of Applied Computer Science & Mathematics
spelling doaj.art-241ab772dd82467485557a70d15a390b2022-12-22T00:39:44ZengStefan cel Mare University of SuceavaJournal of Applied Computer Science & Mathematics2066-42732066-31292021-04-011512125https://doi.org/10.4316/JACSM.202101003A Comparative Study of Cocktail Sort and Insertion SortCarissa KOMALASARI0Wirawan ISTIONO1Universitas Multimedia Nusantara, IndonesiaUniversitas Multimedia Nusantara, IndonesiaSorting is one of the basic operations in Computer Science. This operation is often used to meet a variety of requirements, such as processing and sorting data. It is challenging to find the desired information in unsorted data. This is the reason why there are plenty of sorting algorithms exist to find the most efficient algorithm. This study compares the efficiency level of Cocktail sort and Insertion sort. The efficiency level measured by the execution time or the CPU usage time. Both algorithms were tested to sort a certain amount of random data with variation amount of data. The amount of data that will be used in this research is 1500, 3000, 4500 and 6000 data using C language. After testing and comparing the two algorithms, cocktail sort and insertion sort, the results shows that, the Insertion sort algorithm is proven to be more efficient and faster than the Cocktail sort algorithm.https://jacsm.ro/view/?pid=31_3cocktail sortinsertion sortcpu timessorting
spellingShingle Carissa KOMALASARI
Wirawan ISTIONO
A Comparative Study of Cocktail Sort and Insertion Sort
Journal of Applied Computer Science & Mathematics
cocktail sort
insertion sort
cpu times
sorting
title A Comparative Study of Cocktail Sort and Insertion Sort
title_full A Comparative Study of Cocktail Sort and Insertion Sort
title_fullStr A Comparative Study of Cocktail Sort and Insertion Sort
title_full_unstemmed A Comparative Study of Cocktail Sort and Insertion Sort
title_short A Comparative Study of Cocktail Sort and Insertion Sort
title_sort comparative study of cocktail sort and insertion sort
topic cocktail sort
insertion sort
cpu times
sorting
url https://jacsm.ro/view/?pid=31_3
work_keys_str_mv AT carissakomalasari acomparativestudyofcocktailsortandinsertionsort
AT wirawanistiono acomparativestudyofcocktailsortandinsertionsort
AT carissakomalasari comparativestudyofcocktailsortandinsertionsort
AT wirawanistiono comparativestudyofcocktailsortandinsertionsort