<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>回溯 on Chen Kai Blog</title><link>https://www.chenk.top/zh/tags/%E5%9B%9E%E6%BA%AF/</link><description>Recent content in 回溯 on Chen Kai Blog</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sun, 14 Aug 2022 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/zh/tags/%E5%9B%9E%E6%BA%AF/index.xml" rel="self" type="application/rss+xml"/><item><title>LeetCode（八）：回溯算法</title><link>https://www.chenk.top/zh/leetcode/08-%E5%9B%9E%E6%BA%AF%E7%AE%97%E6%B3%95/</link><pubDate>Sun, 14 Aug 2022 09:00:00 +0000</pubDate><guid>https://www.chenk.top/zh/leetcode/08-%E5%9B%9E%E6%BA%AF%E7%AE%97%E6%B3%95/</guid><description>&lt;p>当你遇到需要“枚举所有可能”的问题时，回溯算法几乎是不二之选——无论是全排列、子集、合法棋盘布局，还是网格中的路径搜索，它都能派上用场。简单来说，回溯是一种“带脑子的暴力搜索”：它一步步构建候选解，一旦发现当前路径违反约束、无法通向合法答案，就立刻放弃，并撤销上一步的选择，恢复到干净的状态，再尝试其他分支。整个过程可以浓缩为三个动作：&lt;strong>选择 → 递归 → 撤销&lt;/strong>。&lt;/p></description></item></channel></rss>