Created
May 26, 2020 06:58
-
-
Save BMU-Verlag/6ea376955ad51ca88beedd7830253bca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bubble_sort(numbers): | |
swapped = false | |
while (swapped): | |
for 1 <= i < n: | |
if numbers[i] > numbers[i+1]: | |
swap(numbers[i], numbers[i+1]) | |
swapped = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment