
算法
文章平均质量分 65
杨殿生
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
算法
算法目录排序算法有哪些?最快的排序算法是哪个?比较排序算法(Comparison Sorts)CategoryNameBestAverageWorstMemoryStability 插入排序 (Insertion Sorts) 插入排序(Insertion Sort)nn2n21Stable 希尔排序(Shell Sort)nn log2 nn log2 n1Not Stable 交换排序(Ex...原创 2018-04-08 09:42:29 · 484 阅读 · 0 评论 -
排序算法
不错的算法文章http://www.cnblogs.com/eniac12/p/5329396.html1,交换排序 1)冒泡排序尽管是最容易理解的排序算法之一,但他对于少数元素之外的数列排序是很没有效率的 //冒泡排揎 private static void bubbleSort(int[] arr) { for (int i = 0; i < arr.length...原创 2018-04-02 19:30:19 · 200 阅读 · 0 评论 -
查找算法
https://www.cnblogs.com/yw09041432/p/5908444.html1,顺序查找说明。适合查找存储结构为顺序存储或者链接存储的线性表时间复杂度O(n)//顺序查找 private static int sequenceSearch(int[] arr, int value) { for (int i = 0; i < arr.length...原创 2018-04-03 14:32:54 · 184 阅读 · 0 评论 -
算法读书笔记
1,二分查找public class BinarySearch { //二分查找,查找的数组必须有序 public static int rank(int[] a,int key) { int lo = 0; int hi = a.length - 1; while(lo <= hi){ int mid ...原创 2018-07-10 09:39:11 · 463 阅读 · 0 评论