VOOZH about

URL: https://gist.github.com/jairhumberto

⇱ jairhumberto’s gists · GitHub


Skip to content
Sign in Sign up

Instantly share code, notes, and snippets.

function bubbleSort(array) {
for (let i=1, sorted; !sorted; i++) {
sorted = 1;
for (let j=0; j < array.length - i; j++) {
if (array[j] > array[j+1]) {
[array[j+1], array[j], sorted] = [array[j], array[j+1], 0];
}
}
}
You can’t perform that action at this time.