代码如下: [removed] var R1=[5,2,10,4,90,88,65,62]; var R2=[5,2,10,4,90,88,65,62]; function BubbleSort1(){ var n=R1.length; for(var i=0;i<n-1;i++){ var flag=false; for(var j=0;j<n-i;j++){ var temp; if(R1[j]<R1[j+1]){ temp=R1[j+1]; R1[j+1]=R1[j]; R1[j]=temp; } flag=true; } if(!flag)
2022-05-29 18:56:55
16KB
AS
asc
c
1