mercoledì 19 maggio 2010

smoklebubble

void swap(int *x, int *y){
int aus=*x;
*x=*y;
*y=aus;
}

void bubbleSort(int a[], int size){
int i,j;
for(i=size-1;i>=0;i--){
for(j=1;j<=i;j++)
if(a[j-1] > a[j])
swap(&a[j],&a[j-1]);
}
}

void stampa_Arr(int a[], int size){
int i;
for(i=0;i printf("%d ", a[i]);
}
printf("\n");
}

main(){
int a[DIM];
int i;
srand(time(NULL));
for(i=0;i a[i]=rand()%100;
}
stampa_Arr(a,DIM);
bubbleSort(a,DIM);
stampa_Arr(a,DIM);
}

Nessun commento:

How to deploy Podman images to OpenShift Container Platform (CRC on localhost)

I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost.       1. Get the...