
Step1_Algorithm_Google
文章平均质量分 56
linkedin_39403967
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Algorithm 3: Probabilistic Analysis and Randomized Algorithms
利用 概率论,实现很多有意思的问题。譬如这个 礼券收集者问题 和 雇佣者问题。 都是 概率论的典型应用。是一种作为预测与概率分析的有效手段!!几个有意思的问题生日悖论球与箱子礼券收集者问题数组随机化算法问题原创 2017-07-13 13:34:01 · 407 阅读 · 0 评论 -
AVL的详细讲解
http://www.cnblogs.com/vamei/archive/2013/03/21/2964092.html存在的问题:AVL能够使得二叉树维持绝对的平衡:最大深度与最小深度之差最多为1。而Red-black通过红黑树的五条性质,使得红黑树的最大深度能为h≤2log(n+1)h \le 2log(n+1),并不能有AVL这样的绝对平衡性。但他们的深度都能在O(lgn)O(lgn)。原创 2017-07-26 23:07:23 · 1691 阅读 · 0 评论 -
Algorithm:Hash 及 二叉搜索树
hash直接寻址,即集合U为所有Key的集合,且|U|集合U为所有Key的集合,且|U|的值不打,key值不重复。那么可以采用直接寻址,类似于数组Hash链表 检索元素的效率依赖于Hash函数的选取。但是操作的平均复杂度能够达到O(1)O(1)。Hash函数的选取有除法散列,乘法散列等。 全域散列Hash 为了防止单一的Hash函数造成某些特定输入的序列极大不均匀的情况,设定集合F,F集合F原创 2017-07-24 19:57:20 · 318 阅读 · 0 评论 -
Algorithm Day2
Divide-and-Conquerproblems The maximum-subarray problem Strassen’s algorithm for matrix multiplicationpractices subarray Strassen’s matrix multiplication merge sort原创 2017-07-10 14:30:13 · 195 阅读 · 0 评论 -
<Summary> book list
Information Theory: Inference and Learning Algorithms信息类智力题编程之美原创 2017-07-18 15:49:51 · 213 阅读 · 0 评论 -
尾递归:实际中为什么快排会比堆排快?
尾递归尾递归就是从最后开始计算, 每递归一次就算出相应的结果, 也就是说, 函数调用出现在调用者函数的尾部, 因为是尾部, 所以根本没有必要去保存任何局部变量. 直接让被调用的函数返回时越过调用者, 返回到调用者的调用者去.递归解题相对常用的算法如普通循环等,运行效率较低。因此,应该尽量避免使用递归,除非没有更好的算法或者某种特定情况,递归更为适合的时候。在递归调用的过程当中系统为每一层的返回点原创 2017-07-18 14:45:59 · 1948 阅读 · 0 评论 -
Analysis of Algorithm 2: Master theorem & Math induction
Using Master theorem to get Running time of Algorithm T(n)For Divided-and-Conquer to get Running time T(n)Here is the Master theoremEx.1 Merge sortT(n)={Θ(1),n=12T(n/2)+Θ(n),n>1T(n) = \lbrace_{2T(n/2原创 2017-07-08 11:56:46 · 385 阅读 · 0 评论 -
Recursion !!! Recursive calls should not address subproblems that overlap !!!
Recursion. A recursive method is a method that calls itself either directly or indirectly. There are three important rules of thumb in developing recursive programs:The recursion has a base case.Recu原创 2017-07-07 13:55:21 · 255 阅读 · 0 评论 -
Algorithm Day1
Algorithm Day 1To get understand the impact of algorithm.Know about the problem of “Dynamic connectivity” Learned there are three ways to solve this problem:Quick find, Quick Union,Weighted Quick u原创 2017-07-04 14:58:57 · 342 阅读 · 0 评论 -
Summary of Analysis of Algorithm
How to analyze algorithm: summarywe usually take the mathmatical analysis for algorithm原创 2017-07-07 13:16:43 · 261 阅读 · 0 评论 -
比较排序算法总结
冒泡选择odd-even奇偶排序(for i…n : if i %2 == 0 : 所有的连续的奇偶位置的元素比较并交换; else : 所有连续的偶奇位置的元素比较并交换)双向冒泡归并排序快速排序插入排序希尔排序(引入交换步长的概念,优化插入排序在最差情况下的速度)堆排序内省排序(快排递归到一定深度后,采用堆排序。)参考引用: 比较排序算法(Comparison Sorts)原创 2017-07-20 10:11:40 · 193 阅读 · 0 评论 -
Algorithm 3: Complete binary tree
完全二叉树及其性质(可用于heapsort等)如下图所示,是一棵近似的完全二叉树,以此举例说明。(b)是该树用 数组的存储的表示形式,其中数组中的连线部分,代表着后面被连线的元素是前一个元素的孩子节点。下面描述,如何通过完全二叉树的相关性质 对于数组中位置下标为 idx idx 的元素,快速找到其孩子节点的元素在数组中的下表位置ci1,ci2ci_1,ci_2完全二叉树的 节点总数 为 2(n−原创 2017-07-13 16:18:14 · 288 阅读 · 0 评论 -
<需要补充学习的资料>: AVL tree , Tire tree(前缀树(prefix tree),后缀树(suffix tree)),radix tree, aho-corasick
补充资料: AVL tree , Tire tree(前缀树(prefix tree),后缀树(suffix tree)),radix tree, aho-corasick关于各中tree的讨论和介绍 作者:王伟豪 链接:https://www.zhihu.com/question/30527705/answer/52919336 来源:知乎 著作权归作者所有。商业转载请联系作原创 2017-07-26 21:57:19 · 612 阅读 · 0 评论