# Search & Backtracking 搜索与回溯

## 普遍要求返回 “所有解” ，大多为暴力穷举，本质上是划出搜索结构树做 DFS.

## 要注意这类题和 DP 的区别与联系，有些题比如 Word Break II 符合 DP 性质，可以在搜索类基础上实施记忆化搜索，但是这样的题不多。


---

# 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://mnunknown.gitbook.io/algorithm-notes/search_and_backtracking_sou_suo_yu_hui_su.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.
