Bubble sort in C
February 8, 2020
Simple bubble sort in C –
for (i=0; i<n-1; i++){
for(j=i+1; j<n; j++){
if(x[j] < x[i]){
temp = x[j];
x[j] = x[i];
x[i] = temp;
}
}
}
Simple bubble sort in C –
for (i=0; i<n-1; i++){
for(j=i+1; j<n; j++){
if(x[j] < x[i]){
temp = x[j];
x[j] = x[i];
x[i] = temp;
}
}
}