File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/algorithms/sorting/bubble-sort Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 3
3
Bubble sort, sometimes referred to as sinking sort, is a
4
4
simple sorting algorithm that repeatedly steps through
5
5
the list to be sorted, compares each pair of adjacent
6
- items and swaps them if they are in the wrong order(ascending or descending arrangement).
7
- The pass through the list is repeated until no swaps
8
- are needed, which indicates that the list is sorted.
6
+ items and swaps them if they are in the wrong order
7
+ (ascending or descending arrangement). The pass through
8
+ the list is repeated until no swaps are needed, which
9
+ indicates that the list is sorted.
9
10
10
11
![ Algorithm Visualization] ( https://upload.wikimedia.org/wikipedia/commons/c/c8/Bubble-sort-example-300px.gif )
11
12
You can’t perform that action at this time.
0 commit comments