Update CocktailShakerSort.js

This commit is contained in:
Chong Yao Jun 2022-09-02 11:13:52 +08:00 committed by GitHub
parent 508e4d1313
commit 9c9f694caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,11 +48,10 @@ export default class CocktailShakerSort extends Sort {
swapped = true; swapped = true;
} }
} }
// Move the start point forward by one, // Move the start point forward by one,
// because the item at the start point is already in its correct position. // because the item at the start point is already in its correct position.
start += 1; start += 1;
} }
return array; return array;
} }