Skip to content

Commit 2ebc986

Browse files
authored
Update heap_sort.c
1 parent 8de917d commit 2ebc986

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sorting/heap_sort.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ void build_maxheap(int *a, int n);
66

77
/**
88
* max_heapify takes O(logn).
9+
* @param a pointer to array a containing heap elements.
10+
* @param i element at which max_heapify needs to be performed.
11+
* @param n where n is number of elemnts in array a.
12+
* @returns void.
913
*/
1014
void max_heapify(int *a, int i, int n)
1115
{
@@ -44,6 +48,9 @@ void heapsort(int *a, int n)
4448

4549
/**
4650
* build_maxheap takes O(n).
51+
* @param a pointer to array a containing heap elements.
52+
* @param n where n is number of elemnts in array a.
53+
* @returns void.
4754
*/
4855
void build_maxheap(int *a, int n)
4956
{

0 commit comments

Comments
 (0)