This repository contains implementations of various sorting algorithms. Written in C, it aims to make the user understand more about time complexity of some sorting algorithms. Sorting algorithms are essential tools in computer science and are used to arrange elements of a list in a specific order.
- Bubble Sort: A simple comparison-based algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
- Insertion Sort: Another simple comparison-based algorithm that divides the input list into two parts: a sorted sublist and an unsorted sublist, and repeatedly selects the smallest (or largest) element from the unsorted sublist and moves it to the sorted sublist.
- Selection Sort: An efficient comparison-based algorithm that builds the final sorted list one item at a time, by repeatedly taking the next element from the input list and inserting it into its correct position in the already sorted part of the list.
- Quick Sort: Another divide-and-conquer algorithm that picks an element as a pivot and partitions the input list around the pivot, recursively sorting each partition.
Each algorithm implementation is provided in its respective file along with documentation instructions on how to use it.
Contributions to this repository are welcome! If you would like to add a new sorting algorithm or improve an existing implementation, please follow these steps:
- Fork this repository.
- Create a new branch (
git checkout -b feature/new-algorithm
). - Make your changes and commit them (
git commit -am 'Add new algorithm'
). - Push to the branch (
git push origin feature/new-algorithm
). - Create a new pull request.
This repository was authored by:
- Norbert Ephraim
- Christiana Apinoko
This project is licensed under the MIT License