Skip to content

Commit 5ede15c

Browse files
committed
add bubble sort
1 parent 553cdc8 commit 5ede15c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/1.bubble_sort.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ arr := []int{3, 5, 10, 8, 12, 1}
2525

2626
这个算法有些类似于我们在操场排队跑步,老师总是说:"高的站前面,低的站后面"。我们一开始并不一定会站到准确的位置上, 接着老师又说:"你比前面的高,和前面的换换,还高,再和前面换换", 就这样找到自己的位置。
2727

28-
## 动圈演示
28+
## 动图演示
2929

3030
![bubbleSort](https://user-images.githubusercontent.com/5203608/97680363-8a8e4a00-1ad1-11eb-81ba-936e536b803e.gif)
3131

32-
__: 黄色为元素为排好的元素,绿色为待排序的元素
32+
__:
33+
1. 黄色为元素为排好的元素,绿色为待排序的元素
34+
2. 图转自 https://sort.hust.cc/1.bubblesort
35+
3336

3437

3538

0 commit comments

Comments
 (0)