Skip to content

Commit 7ce5a55

Browse files
committed
changes
1 parent b36c49e commit 7ce5a55

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

MaxHeap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include<stdio.h>
1+
26 } 26 } 26 }#include<stdio.h>
22
#include<stdlib.h>
33

44
void maxheapify(int *arr,int heapsize,int i)
@@ -29,6 +29,7 @@ void Heapsort(int *arr,int size)
2929
{
3030
int HeapSize = size;
3131
int HeapLength = HeapSize;
32+
// Find largest non-leaf index.
3233
for(int i=((HeapLength/2)-1);i>=0;i--)
3334

3435
maxheapify(arr,HeapSize,i);

MaxToMeanHeap.c

Whitespace-only changes.

MinHeap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ void heapify(int *arr,int heapsize,int i)
2020
arr[i] = temp;
2121
heapify(arr,heapsize,min);
2222
}
23-
}
23+
}
2424

25-
void MinHeap(int *arr,int size)
26-
{
25+
void MinHeap(int *arr,int size)
26+
{
2727
int i,heapsize;
2828
heapsize = size;
2929
for(i = size/2-1;i>=0;i--)

MinToMaxHeap.c

Whitespace-only changes.

0 commit comments

Comments
 (0)