Date: December 21 2020
Summary:
Keywords: ##zettel #bubble #sort #algorithms #archive
Not Available
function bubblesort(arr)
size = length(arr)
while size > 1
for curr = 2:size
prior = curr - 1
if arr[curr] < arr[prior]
arr[curr], arr[prior] = arr[prior], arr[curr]
end
end
size -= 1
end
return arr
end
Zelko, Jacob. Bubble Sort. https://jacobzelko.com/12212020214025-bubble-sort. December 21 2020.