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

Heap sort #13

Open ObamtechNetworks opened 9 months ago

ObamtechNetworks commented 9 months ago

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

Prototype: void heap_sort(int *array, size_t size); You must implement the sift-down heap sort algorithm You’re expected to print the array after each time you swap two elements (See example below) Write in the file 104-O, the big O notations of the time complexity of the Heap sort algorithm, with 1 notation per line:

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