摘要: 1.二分查找 1 public class BubbleSort { 2 public static int binarySerach(int[] a,int value){ 3 int low=0; 4 int high=a.length-1; 5 ... 阅读全文
posted @ 2015-04-23 22:56 淡纷飞菊 阅读(896) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序public class BubbleSort { public static void bubblesort(int[] a){ for(int i=0;ia[j+1]){ int temp=a[j]; ... 阅读全文
posted @ 2015-04-23 22:14 淡纷飞菊 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 数组 1 public class Swap3 2 { 3 public static void swap(int[] i) 4 { 5 int temp = i[0]; 6 i[0] = i[1]; 7 i[1] = temp; 8 ... 阅读全文
posted @ 2015-04-23 13:01 淡纷飞菊 阅读(114) 评论(0) 推荐(0) 编辑