This repository contains several sorting algorithms implemented in C. Each algorithm is designed to sort an array of integers or a deck of cards in ascending order.
Task | Description |
---|---|
Task 1 | Bubble Sort - Write a function that sorts an array of integers using the Bubble Sort algorithm. |
Task 2 | Insertion Sort List - Write a function that sorts a doubly linked list of integers using the Insertion Sort algorithm. |
Task 3 | Selection Sort - Write a function that sorts an array of integers using the Selection Sort algorithm. |
Task 4 | Quick Sort - Write a function that sorts an array of integers using the Quick Sort algorithm. |
Task 5 | Shell Sort - Write a function that sorts an array of integers using the Shell Sort algorithm. |
Task 6 | Cocktail Shaker Sort - Write a function that sorts an array of integers using the Cocktail Shaker Sort algorithm. |
Task 7 | Counting Sort - Write a function that sorts an array of integers using the Counting Sort algorithm. |
Task 8 | Merge Sort - Write a function that sorts an array of integers using the Merge Sort algorithm. |
Task 9 | Radix Sort (LSD) - Write a function that sorts an array of integers using the Radix Sort algorithm. |
Task 10 | Bitonic Sort - Write a function that sorts an array of integers using the Bitonic Sort algorithm. |
Task 11 | Quick Sort (Hoare Partition Scheme) - Write a function that sorts an array of integers using the Quick Sort algorithm with the Hoare partition scheme. |
Task 12 | Sort Deck of Cards - Write a function that sorts a deck of cards in ascending order. The deck is represented as a doubly linked list. |
To compile and run any of the sorting algorithms, you can use the gcc
compiler with the following command:
gcc -Wall -Wextra -Werror -pedantic -std=gnu89 <main_file.c> <sorting_algorithm.c> <print_array.c> -o <output_name>