mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
Update heap_sort.c
Added time complexities of functions used.
This commit is contained in:
parent
544f492720
commit
60a69ecf58
@ -1,3 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* max_heapify takes O(logn).
|
||||||
|
* build_maxheap takes O(n).
|
||||||
|
* heapsort takes O(nlogn) since it requires above mentioned functions.
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
void max_heapify(int *a, int i, int n);
|
void max_heapify(int *a, int i, int n);
|
||||||
|
Loading…
Reference in New Issue
Block a user