1. 前缀和(Prefix Sum)前缀和模式是对一个数组进行预处理,生成一个新数组,其中索引i处的元素表示从数组开头到i位置的元素总和。这样就能高效地对子数组进行求和查询。当你需要对子数组进行多次求和查询,或者需要计算累加和时,可使用该模式。示例问题: 给定一个数组nums,回答关于特定区间[i, j]内元素之和的...
这个课程来自于educative,是一个美国的算法面试方面很出色的网课平台。 Grokking the Coding Interview: Patterns for Coding Questionswww.educative.iowww.educative.io/courses/grokking-the-coding-interview?aff=xy7W 这门课程是一个算法总结提高的课程,它把算法面试中可能遇到的题分成了各种模式,每类题各个...
https://leetcode.com/discuss/general-discussion/458695/Dynamic-Programming-Patterns Leetcode 上的动态规划题目,可以分为以下几类: Minimum/Maximum Cost to Reach A Target Distinct Ways Merging Intervals DP on strings Decision Making 本文算是翻译一下吧 🙂 ,持续更新。 Min/Max Cost to Reach A Target...
This is an article summarizing topics related to dynamic programming. Its main inspiration comes from these two articles:Dynamic Programming Patternsand怎样学好动态规划? - 穷码农的回答 - 知乎. DP is always a very difficult problem for me and lately, I have done dozens of questions to improve my...
Grokking Dynamic Programming Patterns for Coding Interviews. 这门课主要是针对DP,大部分的题都用递归,Top-Down, Bottom up三种方法解一遍,来龙去脉讲得非常清楚。特别适合DP有一定感觉,但又不能融汇贯通的小伙伴。 Data Structures in Java: An Interview Refresher.这一门课是把数据结构里面的基础数据结构都用...
14. Pattern: 0/1 Knapsack (Dynamic Programming),0/1背包类型 DP可以参考下面的专门的动态规划的课程,里面有更详细的讲解。 经典题目: 0/1 Knapsack (medium) Equal Subset Sum Partition (medium) Subset Sum (medium) Minimum Subset Sum Difference (hard) 15. Pattern: Topological Sort (Graph),拓扑排序...
Dynamic Programming Patterns Update 2,(December 28, 2019): Read this comprehensive interviewing experience from our user as they bare their soul about their journey that had led them to a job offer at Google! Google | L3 | Bangalore | Dec 2019...
Design Patterns, Elements of Reusable Object-Oriented Software(终极参考书) Head First Object-Oriented Analysis and Design(好理解的一本书) Agile Principles Patterns and Practices(重点看S.O.L.I.D principles) 其他CS知识: 如果你时间真的超级充裕的话我还建议你学习以下内容: ...
351.Android-Unlock-Patterns (H-) 399.Evaluate-Division (H-) 488.Zuma-Game (H-) 425.Word-Squares (H-) 959.Regions-Cut-By-Slashes (M+) 1306.Jump-Game-III (M) 1718.Construct-the-Lexicographically-Largest-Valid-Sequence (H-) 1723.Find-Minimum-Time-to-Finish-All-Jobs (H-) 1766.Tree-...
351 Android Unlock Patterns ♥ Medium Swift 350 Intersection of Two Arrays II Easy Swift 349 Intersection of Two Arrays Easy 348 Design Tic-Tac-Toe ♥ Medium Swift 347 Top K Frequent Elements Medium 346 Moving Average from Data Stream ♥ Easy Swift 345 Reverse Vowels of a String Easy Sw...