This repository contains implementations of various sorting algorithms. The goal of this project is to understand and apply sorting algorithms in the C programming language, following specific coding standards and guidelines.
- Bubble Sort
- Insertion Sort
- Selection Sort
- Quick Sort
0-bubble_sort.c
: Implementation of the Bubble Sort algorithm.0-O
: File containing the time complexities of the Bubble Sort algorithm.sort.h
: Header file with all the function prototypes and data structure definitions.- `1-insertion_sort_list.c'
1-O
2-selection_sort.c
2-O
3-quick_sort.c
All files are compiled on Ubuntu 20.04 LTS using gcc
with the options -Wall -Werror -Wextra -pedantic -std=gnu89
.
To compile an algorithm, use: gcc -Wall -Wextra -Werror -pedantic -std=gnu89 [file_name].c -o [output_name]
Each sorting algorithm can be tested with the following steps:
- Clone the repository:
git clone [repository_link]
- Navigate to the repository:
cd sorting_algorithms
- Compile the files (as shown above)
- Run the compiled program:
./[output_name]
All C files are written in Betty coding style. For more information, see Betty coding style.