mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-29 13:23:09 +08:00
deploy
This commit is contained in:
@ -1933,7 +1933,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="1131">11.3.1. 算法流程<a class="headerlink" href="#1131" title="Permanent link">¶</a></h2>
|
||||
<p>设输入数组长度为 <span class="arithmatex">\(n\)</span> ,冒泡排序的步骤为:</p>
|
||||
<p>设数组的长度为 <span class="arithmatex">\(n\)</span> ,冒泡排序的步骤为:</p>
|
||||
<ol>
|
||||
<li>首先,对 <span class="arithmatex">\(n\)</span> 个元素执行“冒泡”,<strong>将数组的最大元素交换至正确位置</strong>,</li>
|
||||
<li>接下来,对剩余 <span class="arithmatex">\(n - 1\)</span> 个元素执行“冒泡”,<strong>将第二大元素交换至正确位置</strong>。</li>
|
||||
|
Reference in New Issue
Block a user