![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
排序算法
排序算法
普通网友
这个作者很懒,什么都没留下…
展开
-
选择排序
选择排序public class BinarySearch { public static int binarySearch(int searchNum, int[] arr, int left, int right) { while (left <= right) { int mid = left + (right - left) / 2; if (arr[mid] == searchNum) {原创 2020-06-28 11:19:26 · 103 阅读 · 0 评论 -
快速排序
快速排序public class BinarySearch { public static int binarySearch(int searchNum, int[] arr, int left, int right) { while (left <= right) { int mid = left + (right - left) / 2; if (arr[mid] == searchNum) {原创 2020-06-28 11:18:30 · 121 阅读 · 0 评论 -
插入排序
插入排序public class BinarySearch { public static int binarySearch(int searchNum, int[] arr, int left, int right) { while (left <= right) { int mid = left + (right - left) / 2; if (arr[mid] == searchNum) {原创 2020-06-28 11:17:27 · 103 阅读 · 0 评论 -
冒泡排序
冒泡排序public class BinarySearch { public static int binarySearch(int searchNum, int[] arr, int left, int right) { while (left <= right) { int mid = left + (right - left) / 2; if (arr[mid] == searchNum) {原创 2020-06-28 11:16:12 · 105 阅读 · 0 评论 -
二分查找
二分查找public class BinarySearch { public static int binarySearch(int searchNum, int[] arr, int left, int right) { while (left <= right) { int mid = left + (right - left) / 2; if (arr[mid] == searchNum) {原创 2020-06-28 11:14:47 · 114 阅读 · 0 评论 -
冒泡排序
/**冒泡排序 */ #include#includevoid bubbleSort(int *arr,int len){ int *p; int n; int temp; for(n = 0;n < len;n++){ p = arr; while(p < arr + len - n - 1){ if(*p > *(p + 1)){原创 2017-03-29 19:48:14 · 293 阅读 · 0 评论