For i = 1 To 4
For j = i + 1 To 5
If a(j) > a(i) Then t = a(j): a(j) = a(i): a(i) = t
Next j
Next i
数组元素a(1)~a(5)的值依次为“15,4,12,7,9”,整个排序过程中,数组中数据比较次数和交换次数分别是( )
微信扫码预览、分享更方便