This project contains C implementations of the following sorting algorithms:
- Bubble Sort
- Insertion Sort
- Selection Sort
- Quick Sort
- File:
0-bubble_sort.c - Description: Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
- File:
1-insertion_sort.c - Description: Insertion Sort is a simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.
- File:
2-selection_sort.c - Description: Selection Sort is a simple sorting algorithm that divides the input list into two parts: a sorted and an unsorted region. It repeatedly selects the smallest (or largest) element from the unsorted region and swaps it with the first element of the unsorted region.
- File:
3-quick_sort.c - Description: Quick Sort is a divide-and-conquer algorithm. It selects a 'pivot' element and partitions the other elements into two sub-arrays according to whether they are less than or greater than the pivot.
Ensure that you have a C compiler (such as GCC) installed on your machine.