algorithms/arrays-and-sorting/runningtime.c
int runningTime(int arr_count, int* arr) {
    int i,j;
    int value;    
    int shifts = 0;
    for(i=1;i<arr_count;i++) 
    {
        value=arr[i];
        j=i-1;
        while(j>=0 && value<arr[j])
        {
            arr[j+1]=arr[j];
            shifts++;
            j=j-1;
        }
        arr[j+1]=value;
    }
    return shifts;    
}
// Complete the runningTime function below.
Complete the runningTime function below.
Complete the runningTime function below .
int runningTime(int arr_count, int* arr) {
    int i,j;
    int value;    
    int shifts = 0;
    for(i=1;i<arr_count;i++) 
    {
        value=arr[i];
        j=i-1;
        while(j>=0 && value<arr[j])
        {
            arr[j+1]=arr[j];
            shifts++;
            j=j-1;
        }
        arr[j+1]=value;
    }
    return shifts;    
}
int runningTime ( int arr_count , int * arr ) { int i , j ; int value ; int shifts = 0 ; for ( i = 1 ; i < arr_count ; i ++ ) { value = arr [ i ] ; j = i - 1 ; while ( j >= 0 && value < arr [ j ] ) { arr [ j + 1 ] = arr [ j ] ; shifts ++ ; j = j - 1 ; } arr [ j + 1 ] = value ; } return shifts ; }
Complete the runningTime function below.
Complete the runningTime function below .