冒泡排序
如需从小到大,直接把>=换成小于等于就行
public static void main(String[] args) {
int[] array = new int[]{8,5,3,7,8,0,23};
int temp = 0;
for (int i = 0; i < array.length - 1; i++) {
for (int j = 0; j < array.length - 1; j++) {
if (array[j] >= array[j+1]){
temp = array[j+1];
array[j+1] = array[j];
array[j] = temp;
}
}
}
System.out.println(array);
}
四平方定理
用餐安全距离
运动健身(阶乘)
电话号码脱敏
目录整理