摘要:
数组反转: public class ArrayDemo { public static void main(String[] args){ int[] arrays = {1,2,3,4,5,6}; String[] arrays2 ={"I","LOVE","YOU"}; arrays2=rev 阅读全文
摘要:
冒泡排序: public class MaoPaoSort { public static int[] maopaoSort(int[] nums){ boolean hasChange = true; for(int i= 0; i<nums.length-1 && hasChange ;i++) 阅读全文
摘要:
插入排序: 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>= 阅读全文