This project, titled "0x1B. C - Sorting algorithms & Big O,". The primary goal of this project is to gain a deep understanding of various sorting algorithms and the Big O notation for analyzing algorithm time complexity. Project Overview
We will explore and implement several sorting algorithms in the C programming language. These sorting algorithms include Bubble Sort, Insertion Sort, Selection Sort, and Quick Sort. For each algorithm, we will provide a function that sorts an array of integers in ascending order.
In addition to implementing the sorting algorithms, we will analyze their time complexity using Big O notation. This analysis will help us understand how these algorithms perform in different scenarios.
For this project, the following resources are provided:
print_array and print_list functions for printing arrays and linked lists, respectively.
A listint_t data structure for doubly linked lists.
Throughout the project, we will analyze the time complexity of the sorting algorithms in terms of Big O notation. We will provide these analyses for each algorithm, considering their best-case, average-case, and worst-case scenarios.
To test the sorting algorithms with large sets of random integers, you can use external resources like [Random.org]. Tasks
Implement the Bubble Sort algorithm for sorting an array of integers in ascending order.
Provide the Big O notations for the time complexity of Bubble Sort in the best case, average case, and worst case scenarios.
Implement the Insertion Sort algorithm for sorting a doubly linked list of integers in ascending order.
Provide the Big O notations for the time complexity of Insertion Sort in the best case, average case, and worst case scenarios.
Implement the Selection Sort algorithm for sorting an array of integers in ascending order.
Provide the Big O notations for the time complexity of Selection Sort in the best case, average case, and worst case scenarios.
Implement the Quick Sort algorithm for sorting an array of integers in ascending order, using the Lomuto partition scheme.
Provide the Big O notations for the time complexity of Quick Sort in the best case, average case, and worst case scenarios.
By Thabiso Rantsho