《DATA STRUCTRUES A Psuedocode Approach with C++》Chaper 3. Linked List Learn Note

3-1 LINEAR LIST CONCEPTLinear lists can be divided into two categories: general and restricted.In a general list, data can be inserted and deleted anywhere and there are no restrictions on the operations that can be used to process the list. Such as the random list, ordered list.In a restricted list, data can only be added or deleted at the ends of the structure and processing is restricted to op... Read More

《DATA STRUCTRUES A Psuedocode Approach with C++》Chapter 2. Searching Learn Note

Chapter 1 Introductio1-2 The Abstract Data Typ什么事抽象数据类型(ADT)?下面是我的理解描述的是一种抽象的数据,那么这个数据的抽象属性该如何描述呢?定义一个(抽象的)数据,其中包含数据的存储方式,一些操作方法。但是,对外屏蔽其实现细节。也就是说,对于使用者而言,知道它能做些什么事情,但不需要知道它是如何实现的。即抽象数据类型。举例来说,C++中的Stack,Queue,Java中的Class即为抽象数据类型的例子。Chapter 2 Searchin2-1 List SearcheSequential SearcSequential Search(顺序搜索Sentinel Search(哨兵搜索哨兵搜索,相对于顺序搜索,主要是通过在序列尾部追加目标值,进而减少在搜索过程中下标索引的判断次数,以提升搜索性能。Probability Search(概率搜索... Read More

Protected: 2019算法与数据结构学习清单

字符串最长公共子串(Longest Common Substring)最长公共子序列(Longest Common Sequence)字符串 & 文件内容Diff滚动哈希(Rolling Hash)- Rabin-Karp string-searchingrsyncSuffix arrayMinimal string(最小表示法)数论负进制(如:-2进制)的转换与加法运算图论Prim's Minimum Spanning Tree(MST Read More

小旭讲解 LeetCode 399. Evaluate Division 并查集

原题英文 —— Evaluate DivisioEquations are given in the formatA / B = k, whereAandBare variables represented as strings, andkis a real number (floating point number). Given some queries, return the answers. If the answer does not exist, return-1.0.Example:Givena / b = 2.0, b / c = 3.0.queries are:a / c = ?, b / a = ?, a / e = ?, a / a = ?, x / x = ? .return[6.0, 0.5, -1.0, 1.0, -1.0 ].The input is:vec... Read More

小旭讲解 LeetCode 39. Combination Sum 回溯法

原题Given asetof candidate numbers (candidates)(without duplicates)and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Thesamerepeated number may be chosen fromcandidatesunlimited number of times.NoteAll numbers (includingtarget) will be positive integers.The solution set must not contain duplicate combinations.Example 1Input: candidates... Read More


从2018年7月份开始,基础薄弱的我从0开始刷LeetCode题目。目的性很明确,也很简单——就是为了提高解决问题的思考实践能力,也为了提升自己的核心竞争力。也许,牛人会觉得这并不算什么竞争力。是的,我同意的。但,这是我目前能做的比较基础的事情罢了。迄今(2018年12月28日)为止,已经刷了108道题目。顺序基本上是按照出现的频率(Frequency)来刷的,这个频率在LeetCode上需要订阅后才可以看得到。那么在刷了108道题目后,有那么一些题目会觉得“似曾相识”了,也会有一种触类旁通的感觉了。所以,我觉得应该适当放慢刷题的速度,同时做做总结了。所以,计划了一项视频解说计划,在YouTubeh和B站都建立了《小旭解说算法之路》的频道,欢迎订阅,多多提建议。那么,进入正题。经过了108道题的历练之后,我来说说对于分治法、回溯法和动态规划的理解。我觉得他们三者是一个相互有交集的概念,并不... Read More

小旭讲解 LeetCode 53. 最大子序和 动态规划 分治策略

原题Given an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.ExampleInput: [-2,1,-3,4,-1,2,1,-5,4]Output: Explanation:[4,-1,2,1] has the largest sum = 6.Follow upIf you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle.题解动态规划哔哩哔哩 动态规划YouTube 动态规划通过把原问题分解为相对简单的子问题的方式求解复杂问题的方法。... Read More