avatar
文章
181
标签
197
分类
18

文章
  • 常见算法
  • 图算法
  • 树算法
  • 技巧
  • 笔记
  • 系列
  • 算法题
  • Solution
归档
  • 标签
  • 分类
  • 时间轴
友链
随机文章
BUGHERE の 博客
搜索
文章
  • 常见算法
  • 图算法
  • 树算法
  • 技巧
  • 笔记
  • 系列
  • 算法题
  • Solution
归档
  • 标签
  • 分类
  • 时间轴
友链
随机文章

algorithm-dp-state-machine

发表于2024-07-31|更新于2024-09-07|algorithmdp
|字数总计:113|阅读时长:1分钟

状态机dp

一般定义 f[i][j] 表示在 nums[:i] 在状态 j 下的最优值。一般 j 都很小

代表题目是「买卖股票」系列

  • 121. 买卖股票的最佳时机
  • 122. 买卖股票的最佳时机 II
  • 123. 买卖股票的最佳时机 III
  • 188. 买卖股票的最佳时机 IV
  • 309. 买卖股票的最佳时机含冷冻期
  • 714. 买卖股票的最佳时机含手续费
文章作者: BUGHERE
文章链接: https://bughere.github.io/algorithm/dp/algorithm-dp-state-machine/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 BUGHERE の 博客!
dpdynamic-programmingstate-machine
cover of previous post
上一篇
algorithm-problem-leetcode-3276
cover of next post
下一篇
algorithm-dp-linear
相关推荐
cover
2024-07-26
algorithm-dp-backtracking
cover
2024-07-21
algorithm-dp-bag
cover
2024-07-21
algorithm-dp-data-structure-optimization
cover
2024-07-21
algorithm-dp-digital
cover
2024-09-10
algorithm-dp-game-theory
cover
2024-07-21
algorithm-dp-grid

评论
avatar
BUGHERE
Let's fxxking go!
文章
181
标签
197
分类
18
目录
  1. 1. 状态机dp
©2023 - 2025 By BUGHERE
框架 Hexo|主题 Butterfly
搜索