source/algorithms/heapSort.c
void heapSort(int vector[], int vector_size)
{
    for (int i = (vector_size/2-1); i >= 0; i--)
    {
        heapify(vector, vector_size, i);
    }

    for (int i = (vector_size-1); i >= 0; i--)
    {
        swap(&vector[0], &vector[i]);
        heapify(vector, i, 0);
    }
}
//Main Heap Sort function, uses a secondary function "swap".
//Receives a integer vector and it's size as input.

Main Heap Sort function, uses a secondary function "swap".
Receives a integer vector and it's size as input.
Main Heap Sort function uses a secondary function " swap " . Receives a integer vector and it ' s size as input .
void heapSort(int vector[], int vector_size)
{
    for (int i = (vector_size/2-1); i >= 0; i--)
    {
        heapify(vector, vector_size, i);
    }
    for (int i = (vector_size-1); i >= 0; i--)
    {
        swap(&vector[0], &vector[i]);
        heapify(vector, i, 0);
    }
}
void heapSort ( int vector [ ] , int vector_size ) { for ( int i = ( vector_size / 2 - 1 ) ; i >= 0 ; i -- ) { heapify ( vector , vector_size , i ) ; } for ( int i = ( vector_size - 1 ) ; i >= 0 ; i -- ) { swap ( & vector [ 0 ] , & vector [ i ] ) ; heapify ( vector , i , 0 ) ; } }
Main Heap Sort function, uses a secondary function "swap".
Main Heap Sort function uses a secondary function " swap " .