Skip to content

Commit

Permalink
fix(bubble-sort)
Browse files Browse the repository at this point in the history
  • Loading branch information
lv-z-l committed Oct 25, 2023
1 parent 3506dad commit 3ddba57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions articles/algorithm/sort/bubble-sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function bubbleSort(arr) {
for(let i = 0; i < l; i++) {
for(let j = 0; j < l - 1 - i; j++) {
if(arr[j] > arr[j+1]) {
flag = true
[arr[j], arr[j+1]] = [arr[j+1], arr[j]]
}
}
Expand Down

0 comments on commit 3ddba57

Please sign in to comment.