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
This commit is contained in:
parent
18ee0c1546
commit
8de917de6e
@ -3,6 +3,7 @@
|
||||
void max_heapify(int *a, int i, int n);
|
||||
void heapsort(int *a, int n);
|
||||
void build_maxheap(int *a, int n);
|
||||
|
||||
/**
|
||||
* max_heapify takes O(logn).
|
||||
*/
|
||||
@ -40,6 +41,7 @@ void heapsort(int *a, int n)
|
||||
max_heapify(a, 1, i - 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* build_maxheap takes O(n).
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user