标签:sort ace keyword word bubble lin class index ber
一、冒泡排序
public static void bubbleSort(int []arr) { for(int i =1;i<arr.length;i++) { for(int j=0;j<arr.length-i;j++) { if(arr[j]>arr[j+1]) { int temp = arr[j]; arr[j]=arr[j+1]; arr[j+1]=temp; } } } }标签:sort ace keyword word bubble lin class index ber
原文地址:https://www.cnblogs.com/wangcp-2014/p/11527637.html