ObamtechNetworks / sorting_algorithms

A collaborative project about learning the different kinds of the sorting algorithms, Big O notation, time and space complexities and how to implement them
1 stars 0 forks source link

Quick Sort - Hoare Partition scheme #16

Closed ObamtechNetworks closed 9 months ago

ObamtechNetworks commented 9 months ago

Write a function that sorts an array of integers in ascending order using the Quick sort algorithm

Prototype: void quick_sort_hoare(int *array, size_t size); You must implement the Hoare partition scheme. The pivot should always be the last element of the partition being sorted. You’re expected to print the array after each time you swap two elements (See example below) Write in the file 107-O, the big O notations of the time complexity of the Quick sort algorithm, with 1 notation per line:

in the best case in the average case in the worst case