Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Oct 18, 2023
2 parents c2e1bd5 + 2e4300e commit 9cd7108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Contents/01.Array/02.Array-Sort/01.Array-Bubble-Sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
2. 第 $2$ 趟「冒泡」:对前 $n - 1$ 个元素执行「冒泡」,从而使第 $2$ 个值最大的元素放置在正确位置上。
1. 先将序列中第 $1$ 个元素与第 $2$ 个元素进行比较,若前者大于后者,则两者交换位置,否则不交换。
2. 然后将第 $2$ 个元素与第 $3$ 个元素比较,若前者大于后者,则两者交换位置,否则不交换。
3. 依次类推,直到对 $n - 2$ 个元素与第 $n - 1$ 个元素比较(或交换)为止。但是少时诵诗书所所所所是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒是撒
3. 依次类推,直到对 $n - 2$ 个元素与第 $n - 1$ 个元素比较(或交换)为止。
4. 经过第 $2$ 趟排序,使得数组中第 $2$ 个值最大元素被安置在第 $n$ 个位置上。
3. 依次类推,重复上述「冒泡」过程,直到某一趟排序过程中不出现元素交换位置的动作,则排序结束。

Expand Down

0 comments on commit 9cd7108

Please sign in to comment.