This project demonstrates the use of the Cocktail Shaker Sort algorithm to sort election votes in descending order. It includes three files:
main.c
: Contains themain
function to demonstrate the sorting of an array of integers.cocktail_sort.c
: Contains the implementation of the Cocktail Shaker Sort algorithm.election.c
: Uses thecocktail_sort
function to sort an array of election votes.
To compile and run the program:
gcc main.c cocktail_sort.c -o election
./election