Sorting Algorithms & Big O ✏️

C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on. This projects covers the concepts of sorting algorithms

At the end of this project, I was able to achieve:

  • At least four different sorting algorithms
  • What is the Big O notation, and how to evaluate the time complexity of an algorithm
  • How to select the best sorting algorithm for a given input
  • What is a stable sorting algorithm

Tasks ✔️

  1. Function that sorts an array of integers in ascending order using the Bubble sort algorithm
  2. Function that sorts a doubly linked list of integers in ascending order using the Insertion sort algorithm
  3. Function that sorts an array of integers in ascending order using the Selection sort algorithm
  4. Function that sorts an array of integers in ascending order using the Selection sort algorithm
  5. Function that sorts an array of integers in ascending order using the Shell sort algorithm, using the Knuth sequence
  6. Function that sorts a doubly linked list of integers in ascending order using the Cocktail shaker sort algorithm
  7. Function that sorts an array of integers in ascending order using the Counting sort algorithm
  8. Function that sorts an array of integers in ascending order using the Merge sort algorithm
  9. Function that sorts an array of integers in ascending order using the Heap sort algorithm
  10. Function that sorts an array of integers in ascending order using the Radix sort algorithm
  11. Function that sorts an array of integers in ascending order using the Bitonic sort algorithm
  12. Function that sorts an array of integers in ascending order using the Quick sort algorithm
  13. Function that sorts a deck of cards.

Additional info 🚧

Resources

  • Ubuntu 20.04 LTS

  • betty linter

Try It On Your Machine computer:

git clone https://github.com/elameen37/sorting_algorithms.git

cd sorting_algorithms

NEEDS C files of print_lists and print_array of integers

gcc -Wall -Werror -Wextra -pedantic MAIN_FILE.c FILENAME.c -o NEW_FILENAME