Skip to content

Commit 1cc32f7

Browse files
committed
using TAB instead of space in heap_sort.h
1 parent d9877a3 commit 1cc32f7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ PROGRAMS = m_based \
5252
imath_demo \
5353
random_demo \
5454
k-means_demo \
55-
kmp_demo
55+
kmp_demo \
56+
heap_sort_demo
5657

5758
all: $(PROGRAMS)
5859

include/heap_sort.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ namespace alg
3333
Heap<T> heap(number_of_elements);
3434
int i;
3535

36-
/*In order to build a heap structure from input array*/
36+
// In order to build a heap structure from input array
3737
for(i=0;i<number_of_elements;i++)
3838
{
39-
heap.insert(array[i],0); //set key with the value of the array,value to 0(no use)
39+
heap.insert(array[i],0); //set key with the value of the array,value to 0(no use)
4040
}
4141

42-
/*Temporary array to store the minkey of each step,which is deleted from the heap*/
42+
// Temporary array to store the minkey of each step,which is deleted from the heap
4343
T tempArray[number_of_elements];
4444
for(i=0;i<number_of_elements;i++)
4545
{
46-
tempArray[i]=heap.min_key(); //find the min key
47-
heap.delete_min();
46+
tempArray[i]=heap.min_key(); //find the min key
47+
heap.delete_min();
4848
}
4949

5050
for(i=0;i<number_of_elements;i++)
5151
{
52-
array[i]=tempArray[i]; //copy back to the original array
52+
array[i]=tempArray[i]; //copy back to the original array
5353
}
5454
}
5555
}

0 commit comments

Comments
 (0)