leetcode动态规划题目总结

Hello everyone, I am a Chinese noob programmer. I have practiced questions on leetcode.com for 2 years. During this time, I studied a lot from many Great Gods’ articles. After worship, I always wanted to write an article as they did, and now I take the courage to write my first article here.

This is an article summarizing topics related to dynamic programming. Its main inspiration comes from these two articles: Dynamic Programming Patterns and 怎样学好动态规划? - 穷码农的回答 - 知乎. DP is always a very difficult problem for me and lately, I have done dozens of questions to improve my DP skills. But the DP problem is so flexible that random practice has little effect. Therefore, I made further improvements based on these two articles and summarize some typical topics of DP problem. I hope this article can help you.

In this article, all problems come from leetcode.com and leetcode-cn.com which is a Chinese version of leetcode.com. By the way, because I am Chinese, I attached the Chinese translation after the English topics so that I can use this article more convenient in the future. Moreover, can anyone tell me how to create a table of contents? I wrote this article with VSCode and attempted many extensions to do this but all of them failed. I will be very grateful if you can tell me a way to achieve this function.

I will continue practicing DP problems on leetcode.com and will keep updating this article. If you have any better suggestions or supplements, welcome to put them in the comment area and @me. Now the main text begins.

1. Number Tower,数塔

  1. 118. Pascal’s Triangle(Easy)118. 杨辉三角(简单)
  2. 119. Pascal’s Triangle II(Easy)119. 杨辉三角 II(简单)
  3. 64. Minimum Path Sum(Medium)64. 最小路径和(中等)
  4. 120. Triangle(Medium)120. 三角形最小路径和(中等)
  5. 931. Minimum Falling Path Sum(Medium)931. 下降路径最小和(中等)
  6. 1289. Minimum Falling Path Sum II(hard)1289. 下降路径最小和 II(困难)
  7. 1301. Number of Paths with Max Score(hard)1301. 最大得分的路径数目(困难)

2. Fibonacci Numbers,斐波那契数列

  1. Fibonacci numbers,斐波那契数列问题
    1. 509. Fibonacci Number(Easy)509. 斐波那契数(简单)
    2. 1137. N-th Tribonacci Number(Easy)1137. 第 N 个泰波那契数(简单)
  2. Staircase,爬楼梯问题
    1. 70. Climbing Stairs(Easy)70. 爬楼梯(简单)
    2. 746. Min Cost Climbing Stairs(Easy)746. 使用最小花费爬楼梯(简单)
  3. House thief,偷房子问题
    1. 198. House Robber(Easy)198. 打家劫舍(简单)
    2. 213. House Robber II(Medium)213. 打家劫舍 II(中等)

3. Memory Search,记忆化搜索

  1. 139. Word BreakMedium139. 单词拆分中等
  2. 140. Word Break IIHard140. 单词拆分 II困难
  3. 329. Longest Increasing Path in a MatrixHard329. 矩阵中的最长递增路径困难
  4. 1857. Largest Color Value in a Directed GraphHard1857. 有向图中最大颜色值困难

4. 0/1 Knapsack, 0/1 背包

  1. Equal Subset Sum Partition,相等子集划分问题
    1. 416. Partition Equal Subset Sum(Medium)416. 分割等和子集(中等)
  2. Subset Sum,子集和问题
    1. 494. Target Sum(Medium)494. 目标和(中等)
  3. Minimum Subset Sum Difference,子集和的最小差问题
    1. 1049. Last Stone Weight II(Medium)1049. 最后一块石头的重量 II(中等)
  4. Other,其它
    1. 474. Ones and Zeroes(Medium)474. 一和零(中等)
    2. 1770. Maximum Score from Performing Multiplication Operations(Medium)1770. 执行乘法运算的最大分数(中等)
    3. 956. Tallest Billboard(Hard)956. 最高的广告牌(困难)
    4. 1751. Maximum Number of Events That Can Be Attended II(Hard)1751. 最多可以参加的会议数目 II(困难)
  • 12
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值