摘要:
public class Main { public static void main(String[] args) { int [] arr = {9,8,7,6,5,4,3,2,1,0}; insertSort(arr); for(int i:arr) System.out.println(i); } private static void insertSort(int [] arr){ fo... 阅读全文
摘要:
public class Main { public static void main(String[] args) { int [] arr = {9,8,7,6,5,4,3,2,1,0}; selectSort(arr); for(int i:arr) System.out.println(i); } private static void selectSort(int []arr){ for... 阅读全文
摘要:
public class Main { public static void main(String[] args) { int [] arr = {9,8,7,6,5,4,3,2,1,0}; bubbleSort(arr); for(int i:arr) System.out.println(i); } private static void bubbleSort(int [] arr){ fo... 阅读全文
摘要:
public class Main { public static void main(String[] args) { int[] a = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; int x = search(a, 12); System.out.println(x); } private static int search(int[] src, int val)... 阅读全文
摘要:
public class Main { public static void main(String[] args) { char s[] = "ababca12341234fgdf".toCharArray(); char t[] = "3412".toCharArray(); int x = search(s, t); System.out.println(x); } private stat... 阅读全文