理解为赋值互换
for (int i = 0; i < length; i++) { for (int j = 0; j < length-1; j++) { if ([i]<[j+1]) //简单写一下 ,没有定义数组 { int a=0; a=[i]; [i]=[j+1]; [j+1]=a; } } }
冒泡排序
原文:http://www.cnblogs.com/happinesshappy/p/4412531.html