diff --git a/code/minHeap.c b/code/minHeap.c index f857a20..38c16c8 100644 --- a/code/minHeap.c +++ b/code/minHeap.c @@ -24,8 +24,8 @@ min_heap *createMinHeap(int (*comp)(void *, void *)) { */ void insertMinHeap(min_heap **heap, void *element) { // if(DEBUG){ - printf("entered insertion safely\n"); - printHeap((*heap)); + // printf("entered insertion safely\n"); + // printHeap((*heap)); // } // // FIXME: something here is not working size increae then decrease suddenly @@ -39,7 +39,7 @@ void insertMinHeap(min_heap **heap, void *element) { decreaseKey((*heap), (*heap)->size - 1); - printHeap(*heap); + // printHeap(*heap); } /** @@ -57,7 +57,7 @@ void *extractMin(min_heap *heap) { heap->arr[heap->size] = 0; minHeapify(heap, 0); - printHeap(heap); + // printHeap(heap); return minElement; } @@ -123,8 +123,8 @@ void minHeapify(min_heap *heap, int ind) { * - freeing memory of the old heap */ min_heap **doubleCapacity(min_heap* heap) { - printf("Entered doubleCapacity with the following heap:!!\n"); - printHeap(heap); + // printf("Entered doubleCapacity with the following heap:!!\n"); + // printHeap(heap); min_heap *newHeap = malloc(sizeof(*newHeap)); newHeap->capacity = 2 * heap->capacity; @@ -136,9 +136,9 @@ min_heap **doubleCapacity(min_heap* heap) { min_heap **returnval = &newHeap; - printf("doubling occurred!!\n"); - printHeap(*returnval); - printf("Exiting doubleCapcity\n"); + // printf("doubling occurred!!\n"); + // printHeap(*returnval); + // printf("Exiting doubleCapcity\n"); return returnval; }