玩猴子排序的时候偶然想到:
如果这样:
void sort(int &A[]){ if(A为空) return; 找到上升子序列B; 将这个子序列之外的存入A; 打乱A; sort(A); 归并A B; }
不知道效率如何?