diff --git a/codes/shelly/9674981.java b/codes/shelly/9674981.java new file mode 100644 index 0000000000000000000000000000000000000000..7aa905f3acb901a1a470d411df1ce71f7e107a4f --- /dev/null +++ b/codes/shelly/9674981.java @@ -0,0 +1,24 @@ +/** + * 冒泡排序函数 + * aa bb cc + * @param a 待排序的数组 + * @param n 待排序的数组长度 + */ +public static void bubbleSort(int [] a, int n){ + // 你的代码,使无序数组 a 变得有序 + for(int j=0;ja[i+1]) + { + temp=a[i]; + a[i]=a[i+1]; + a[i+1]=temp; + } + } + } + //System.out.println(a); + +} //end