Skip to content

Commit

Permalink
Show swapped elements in bubblesort
Browse files Browse the repository at this point in the history
  • Loading branch information
Otanga-Otieno committed Apr 2, 2022
1 parent e4948d1 commit 085770f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index/src/pages/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async function bubbleSort(arr) {
arr[i] = arr[i+1];
arr[i+1] = swap;
++swaps;
await noSwapTablify(arr, i, i+1);
await tablify(arr, i, i+1);
}
}
if(swaps == 0) break;
Expand Down

0 comments on commit 085770f

Please sign in to comment.