你绝对想不到,世界上最奇葩的排序算法!
void sleep_sort(uint arr[], uint n){
for(uint i=0;i
Thread t = new Thread(){
@Override
public void run(){
sleep(arr[i]);
print(arr[i]);
}
};
t.start();
}
}
评论
void sleep_sort(uint arr[], uint n){
for(uint i=0;i
Thread t = new Thread(){
@Override
public void run(){
sleep(arr[i]);
print(arr[i]);
}
};
t.start();
}
}