![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
2021新牧码人
应该像牛一样,吃两口草,不忘抬头看看
展开
-
直接插入排序----java实现
public static int[] insertSort(int[] B){ int [] c = B; for(int i = 1;i<c.length;i++){ if(c[i]>c[i-1]){ }else{ int j = c[i]; for(int k=i-1;k>原创 2016-07-26 13:42:27 · 363 阅读 · 0 评论 -
二分查找算法----java实现
传入数组应该是有序的, public static int binarySearch(int [] A,int B){ int low =0; int hight = A.length-1; while(A[low]<=B&&B<=A[hight]&&low<=hight){ if(A[(low+hight)/2]==B)原创 2016-07-27 13:24:00 · 279 阅读 · 0 评论 -
7种排序算法(java)——第三遍
public class bubbleSort { public final static int totalCount = 12; public final static int descAsc = 1;// 升序或者降序 /** * @param args */ public static void main(String[] args) {原创 2017-02-10 11:53:11 · 374 阅读 · 0 评论 -
7种排序算法(java)——第四遍
package com.luojie;/** * * @author Brandon 练习排序算法 */public class SortUtil { public static int totalNum = 12; static int initNum[] = new int[totalNum]; public static void main(String[] args原创 2017-02-11 16:08:16 · 487 阅读 · 0 评论 -
7种排序算法(java)——第五遍()
package com.luojie;/** * */public class SortUtilEnd { public static int totalNum = 12; static int initNum[] = new int[totalNum]; public static void main(String[] args) { for (int i原创 2017-02-12 11:36:18 · 341 阅读 · 0 评论 -
用python练练排序算法
插入排序()def insertMeth(mylists): count = len(mylists) for i in range(0,count-1): key = mylists[i] j = i+1 while j1:原创 2018-01-16 17:17:12 · 257 阅读 · 0 评论