![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Introducation to Algorithm
UESTC Like_czw
这个作者很懒,什么都没留下…
展开
-
字符串匹配算法-KMP
文章目录字符串匹配问题KMP算法简介前缀/后缀/部分匹配表甲的疑问1:k = next[k-1]是什么鬼?结论得到部分匹配表后匹配过程算法总结字符串匹配问题引用知乎用户灵茶山艾府的举例,假设我们有两个角色,甲和乙甲:abbaabbaaba乙:abbaaba一天清晨,乙对甲说,你心里到底有没有我,告诉一下我在你心中的位置。甲心中一紧,从头开始一一与乙的字符进行比较。但是,前面的六位都...原创 2020-03-08 14:30:17 · 3657 阅读 · 0 评论 -
Java数据结构与算法3 链表
链表思想链表是以节点的方式进行存储每个节点包含两个域:data+next:指向下一个节点链表的各个节点并不一定是连续存储的链表分为带头节点的链表和不带头节点的链表,根据实际需求来选择我们以水浒英雄好汉的排名来解释链表结构在Java中的实现class HeroNode { int id; String name; ...原创 2020-02-16 12:46:20 · 237 阅读 · 0 评论 -
MIT 算法导论
自己每次看完都写太麻烦了,发现网上有很多写的很好的笔记。搬运笔记原创 2019-11-26 20:45:42 · 312 阅读 · 0 评论 -
Chapter7 Hashtable
Symbol-table ProbemTable s holding n records,each record has a key value and some satellite data.operations1) Insert 2) Delete 3)SearchDirect Access Tablesuppose keys are drawm from U={0,1,…,m-1...原创 2019-11-24 21:10:05 · 230 阅读 · 0 评论 -
Chapter6 Order Statistics && Medium Value
Order StatisticsProblem:Given n elements in array A[0,1,…n-1], to find kth smallest element(elem of rank k)Naive Algorithm:sort A,return A[k] (mergesort/quicksort/heapsort in θ(nlgn))Special cases:...原创 2019-11-24 20:21:40 · 296 阅读 · 0 评论 -
Chapter 5 Sort in linear time
文章目录Sort in linear timeComparison sort(model)Counting sort - sort in linear timeRadix Sort(基数排序)Sort in linear timeHow fast can we sort ?It depends on model of what you can do with the elements....原创 2019-11-23 10:20:14 · 247 阅读 · 0 评论 -
Chapter 4 QuickSort & Randomized Algorithm
@[toc] (Directory)QuickSortfuturesDivide and conquer paradigmSorts “in place” (就地排序)Very practical (with tuning)Divide and ConquerDivide:Partition array into 2 subarrays around pivot x s...原创 2019-11-21 16:56:41 · 290 阅读 · 0 评论 -
Chapter.2 Asymptotic notation&Recurrence's Asymptotic time
DirectoryAsymptotic notationbig-O notation(O means upper bound in soome way)big-omega notation(Ω means lower bound in some way)Other notationsMethods for solving recurrencessubstitution methodRecursio...原创 2019-11-19 19:57:34 · 270 阅读 · 0 评论 -
Chapter.1 Course Introduction&Algorithm Analysis
DirectoryWhat is algorithm analysis?Starting from an usual example - Insertion SortAnaylsis method for running timeEnding with MergeSortWhat is algorithm analysis?The theoretical study of computer-p...原创 2019-11-19 16:07:44 · 294 阅读 · 0 评论 -
Chapter3 Divide and Conquer
DirectoryChapter.3 Divide and ConquerDivide&ConquerExamplesex.1--- mergeSortex.2---binarySearchex.3---powering a numberex.4---Fibonacci numbersMatrix multiplicationMatrix block multiplicationStras...原创 2019-11-16 21:23:26 · 336 阅读 · 0 评论