🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 2.3 The Divide-and-Conquer Approach Having studied two divide-and-conquer algorithms in detail, you should now better understand the following general description of this approach. The ***divide-and-conquer*** design strategy involves the following steps: 1. *Divide* an instance of a problem into one or more smaller instances. 2. *Conquer* (solve) each of the smaller instances. Unless a smaller instance is sufficiently small, use recursion to do this. 3. If necessary, *combine* the solutions to the smaller instances to obtain the solution to the original instance. The reason we say "if necessary" in Step 3 is that in algorithms such as Binary Search Recursive ([Algorithm 2.1](LiB0015.html#149)) the instance is reduced to just one smaller instance, so there is no need to combine solutions. More examples of the divide-and-conquer approach follow. In these examples we will not explicitly mention the steps previously outlined. It should be clear that we are following them.