This commit is contained in:
krahets
2024-05-07 16:35:27 +08:00
parent 885877f818
commit 5a2b679c34
13 changed files with 349 additions and 349 deletions
@@ -3525,7 +3525,7 @@
<li>Divide and conquer can solve many algorithm problems and is widely used in data structure and algorithm design, where its presence is ubiquitous.</li>
<li>Compared to brute force search, adaptive search is more efficient. Search algorithms with a time complexity of <span class="arithmatex">\(O(\log n)\)</span> are usually based on the divide and conquer strategy.</li>
<li>Binary search is another typical application of the divide and conquer strategy, which does not include the step of merging the solutions of subproblems. We can implement binary search through recursive divide and conquer.</li>
<li>In the problem of constructing binary trees, building the tree (original problem) can be divided into building the left and right subtree (subproblems), which can be achieved by partitioning the index intervals of the preorder and inorder traversals.</li>
<li>In the problem of constructing binary trees, building the tree (original problem) can be divided into building the left and right subtree (subproblems), which can be achieved by partitioning the index intervals of the pre-order and in-order traversals.</li>
<li>In the Tower of Hanoi problem, a problem of size <span class="arithmatex">\(n\)</span> can be divided into two subproblems of size <span class="arithmatex">\(n-1\)</span> and one subproblem of size <span class="arithmatex">\(1\)</span>. By solving these three subproblems in sequence, the original problem is consequently resolved.</li>
</ul>