This commit is contained in:
krahets
2023-11-09 05:13:54 +08:00
parent 9a09f9407e
commit 3f666fa676
85 changed files with 619 additions and 610 deletions
@@ -3369,7 +3369,7 @@
<li>循环第 <code>1.</code><code>2.</code> 步,直至找到 <code>target</code> 或区间为空时返回。</li>
</ol>
<p>图 12-4 展示了在数组中二分查找元素 <span class="arithmatex">\(6\)</span> 的分治过程。</p>
<p><a class="glightbox" href="../binary_search_recur.assets/binary_search_recur.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="二分查找的分治过程" src="../binary_search_recur.assets/binary_search_recur.png" /></a></p>
<p><a class="glightbox" href="../binary_search_recur.assets/binary_search_recur.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="二分查找的分治过程" class="animation-figure" src="../binary_search_recur.assets/binary_search_recur.png" /></a></p>
<p align="center"> 图 12-4 &nbsp; 二分查找的分治过程 </p>
<p>在实现代码中,我们声明一个递归函数 <code>dfs()</code> 来求解问题 <span class="arithmatex">\(f(i, j)\)</span></p>