We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ffb7b7 commit f42433eCopy full SHA for f42433e
src/algorithms/sorting/insertion-sort/InsertionSort.js
@@ -21,7 +21,13 @@ export default class InsertionSort extends Sort {
21
this.callbacks.visitingCallback(array[currentIndex - 1]);
22
23
// Swap the elements.
24
- [array[currentIndex - 1], array[currentIndex]] = [array[currentIndex], array[currentIndex - 1]];
+ [
25
+ array[currentIndex - 1],
26
+ array[currentIndex],
27
+ ] = [
28
29
30
+ ];
31
32
// Shift current index left.
33
currentIndex -= 1;
0 commit comments