source/algorithms/bubbleSort.c
void bubbleSort(int vector[], int vector_size)
{
    int i, j;

    for (i = vector_size - 1; i > 0; i--)
    {
        for (j = 0; j < i; j++)
        {
            if (vector[j] > vector[j + 1])
            {
                swap(&vector[j], &vector[j+1]);
            }
        }
    }
}
//C implementation of bubble sort, uses a secondary function "swap".
//Receives a integer vector and it's size as input.

C implementation of bubble sort, uses a secondary function "swap".
Receives a integer vector and it's size as input.
C implementation of bubble sort uses a secondary function " swap " . Receives a integer vector and it ' s size as input .
void bubbleSort(int vector[], int vector_size)
{
    int i, j;
    for (i = vector_size - 1; i > 0; i--)
    {
        for (j = 0; j < i; j++)
        {
            if (vector[j] > vector[j + 1])
            {
                swap(&vector[j], &vector[j+1]);
            }
        }
    }
}
void bubbleSort ( int vector [ ] , int vector_size ) { int i , j ; for ( i = vector_size - 1 ; i > 0 ; i -- ) { for ( j = 0 ; j < i ; j ++ ) { if ( vector [ j ] > vector [ j + 1 ] ) { swap ( & vector [ j ] , & vector [ j + 1 ] ) ; } } } }
C implementation of bubble sort, uses a secondary function "swap".
C implementation of bubble sort uses a secondary function " swap " .