2020年8月24日
摘要: 数组反转: public class ArrayDemo { public static void main(String[] args){ int[] arrays = {1,2,3,4,5,6}; String[] arrays2 ={"I","LOVE","YOU"}; arrays2=rev 阅读全文
posted @ 2020-08-24 00:19 凌晨三点半的飞机 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序: public class MaoPaoSort { public static int[] maopaoSort(int[] nums){ boolean hasChange = true; for(int i= 0; i<nums.length-1 && hasChange ;i++) 阅读全文
posted @ 2020-08-24 00:16 凌晨三点半的飞机 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 插入排序: public class InsertSort { public static int[] insertSort(int[] nums){ for(int i=1,j,current; i<nums.length;i++){ current= nums[i]; for(j=i-1;j>= 阅读全文
posted @ 2020-08-24 00:12 凌晨三点半的飞机 阅读(80) 评论(0) 推荐(0) 编辑