摘要: //测试代码 int[] array = { 10, 20, 30, 40, 50, 60, 70, 80, 90 }; int result = BinarySearch(array, 55); Console.WriteLine(result); //只能查找有序的线性表 static int 阅读全文
posted @ 2019-12-17 23:18 s459165447 阅读(142) 评论(0) 推荐(0) 编辑
摘要: static void BubbleSort(int[] array) { int n=array.Length-1; for(int i=0;i<n;i++) { int flag=0; for(int j=0;j<n-i-1;j++) { if(array[j]>array[j+1]) { fl 阅读全文
posted @ 2019-12-17 04:10 s459165447 阅读(138) 评论(0) 推荐(0) 编辑