mirror of
https://github.com/krahets/hello-algo.git
synced 2025-08-01 17:43:24 +08:00
deploy
This commit is contained in:
@ -3412,7 +3412,7 @@
|
||||
|
||||
|
||||
<h1 id="101">10.1 二分查找<a class="headerlink" href="#101" title="Permanent link">¶</a></h1>
|
||||
<p>「二分查找 Binary Search」是一种基于分治思想的高效搜索算法。它利用数据的有序性,每轮减少一半搜索范围,直至找到目标元素或搜索区间为空为止。</p>
|
||||
<p>「二分查找 binary search」是一种基于分治思想的高效搜索算法。它利用数据的有序性,每轮减少一半搜索范围,直至找到目标元素或搜索区间为空为止。</p>
|
||||
<div class="admonition question">
|
||||
<p class="admonition-title">Question</p>
|
||||
<p>给定一个长度为 <span class="arithmatex">\(n\)</span> 的数组 <code>nums</code> ,元素按从小到大的顺序排列,数组不包含重复元素。请查找并返回元素 <code>target</code> 在该数组中的索引。若数组不包含该元素,则返回 <span class="arithmatex">\(-1\)</span> 。</p>
|
||||
|
Reference in New Issue
Block a user