请问高手ActionScript3.0 怎么排成3333/666/22/5的顺序
问题描述:
请问高手ActionScript3.0 怎么排成3333/666/22/5的顺序
答
冒泡排序法.从大到小,从小到大,一个道理.
var arr:Array=[8,3,4,7,3,2,1,9,0,45,12,678,123,34,123,3246,12,-234,26,89];
getSort();
printArr();
function getSort():void {
var l:int=arr.length;
for (var i:int = 0; i for (var j:int = 0; j if (arr[j]