-
-
Save gomta777/2471b1cdafa29743cf74c963a00b893b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 bubblesort(datalist): | |
| for x in range(len(datalist)): | |
| for y in reversed(range(x + 1, len(datalist))): | |
| if datalist[y-1] > datalist[y]: | |
| datalist[y], datalist[y-1] = datalist[y-1], datalist[y] | |
| # バブルソートの実装 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment