> For the complete documentation index, see [llms.txt](https://jen-hsuan-hsieh.gitbook.io/letcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jen-hsuan-hsieh.gitbook.io/letcode/2.algorithm/23divide-and-conquer.md).

# 2.3.分治法 (Divide and Conquer)

* **Introduction**
  * 將問題先切分成小問題後再解決, 再將結果合併求出原始問題的答案
* **作法**
  * 1.分解：將原問題分解為若干個規模較小，相對獨立，與原問題形式相同的子問題。
  * 2.解決：若子問題規模較小且易於解決時，則直接解。否則，遞歸地解決各子問題。
  * 3.合併：將各子問題的解合併為原問題的解。
* **程式碼**
  * [2.4.河內塔 (Tower of Hanoi)](https://jenhsuan.gitbooks.io/letcode/content/2.algorithm/24he-nei-ta-tower-of-hanoi.html)
