Skip to content

Commit

Permalink
docs: fix typo in Bubble sort doc (doocs#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
翟佳宇 authored Nov 24, 2021
1 parent cc82696 commit e28ac19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basic/sorting/BubbleSort/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

定义一个布尔变量 `hasChange`,用来标记每轮是否进行了交换。在每轮遍历开始时,将 `hasChange` 设置为 false。

若当轮没有发生交换,说明此时数组已经按照升序排列,`hashChange` 依然是为 false。此时外层循环直接退出,排序结束。
若当轮没有发生交换,说明此时数组已经按照升序排列,`hasChange` 依然是为 false。此时外层循环直接退出,排序结束。

## 代码示例

Expand Down

0 comments on commit e28ac19

Please sign in to comment.