Minggu, 22 April 2012

Fusion Sort

int x[ ] = {9,8,1,6,10,4,3};
int n = 7;
for (int i = n-1; i>0; i--){
 for (int j = 0; j<=i; j++){
     if (x[j]>x[i]){

int car,var;
car = x[i];
var = x[j];

x[i] = var;
x[j] = car;
}
}
}

.so simple kan... :)

Tidak ada komentar:

Posting Komentar

 

FollowMe