https://leetcode.cn/problems/house-robber/solutions/138131/dong-tai-gui-hua-jie-ti-si-bu-zou-xiang-jie-cjavap/?envType=study-plan-v2&envId=dynamic-programming 动态规划的方法,最关键的在于找出f(n),和f(n-1),f(n-2)的关系,在n时,要不就是f(n-1)的方法,或者f(n-2) + nums[-1] cla...
1. subarray: 要想到 prefix sum or hashtable to store prefix sum (its index or count.) 或者sl...
Dynamic programming Backtracking ✅ Depth First Search Breadth First Search Binary Search Math Hash Table Sort ✅ Bit Manipulation ✅ Union Find ✅ Sliding Window ✅ Segment Tree ✅ Binary Indexed Tree ✅ 数据结构变种相关题目 顺序线性表:向量 单链表 1.双链表2.静态链表3.对称矩阵4.稀疏...
Leetcode-121 Best Time To Buy And Sell Stock c++, python3 Dynamic Programming O(N) O(1) - Leetcode-122 Best Time To Buy And Sell Stock II c++, python3 Dynamic Programming O(N) O(1) - Leetcode-123 Best Time To Buy And Sell Stock III c++, python3 Dynamic Programming O(N) O(...
Graph Theory is a branch of mathematics. It takes pictures as the research object. A graph in graph theory is a graph composed of a number of given...
functional-programming-jargon Jargon from the functional programming world in simple terms! coding-interview-university A complete computer science study plan to become a software engineer. awesome-webpack-cn 印记中文 - webpack 优秀中文文章 free-programming-books 📚 Freely available programming books ...
115 Distinct Subsequences C#(88ms) O(MN) O(MN) Dynamic Programming 116 Populating Next Right Pointers in Each Node C#(164ms) O(N) O(N) 117 Populating Next Right Pointers in Each Node II C#(244ms) O(N) O(N) 118 Pascal's Triangle C#(200ms) O(N2) O(N2) 119 Pascal's Tria...