# 动态规划系列

我们公众号最火的就是动态规划系列的文章，也许是动态规划问题有难度而且有意思，也许因为它是面试常考题型。不管你之前是否害怕动态规划系列的问题，相信这一章的内容足以帮助你消除对动态规划算法的恐惧。

具体来说，动态规划的一般流程就是三步：**暴力的递归解法 -> 带备忘录的递归解法 -> 迭代的动态规划解法**。

就思考流程来说，就分为一下几步：**找到状态和选择 -> 明确 dp 数组/函数的定义 -> 寻找状态之间的关系**。

这就是思维模式的框架，**本章都会按照以上的模式来解决问题，辅助读者养成这种模式思维**，有了方向遇到问题就不会抓瞎，足以解决一般的动态规划问题。

欢迎关注我的公众号 labuladong，查看全部文章：

![labuladong二维码](/files/-M1hRxGAFIo08kY3uCQa)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://labuladong.gitbook.io/algo-en/dynamic-programming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
