Last active
September 13, 2022 20:45
-
-
Save lukasjoc/2b6695f096584cd1b6c464f2630c4091 to your computer and use it in GitHub Desktop.
GBICS
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
# https://arxiv.org/pdf/2110.01111.pdf | |
In [42]: def sort_simple(l): | |
...: a = l | |
...: for i in range(len(a)): | |
...: for j in range(len(a)): | |
...: if a[i] < a[j]: | |
...: tmp = a[i] | |
...: a[i] = a[j] | |
...: a[j] = tmp | |
...: return a | |
...: | |
In [43]: ints = [int(random.random() * 1000) for x in range(10)] | |
In [44]: ints | |
Out[44]: [499, 306, 429, 276, 879, 858, 321, 316, 778, 295] | |
In [45]: sort_simple(ints) | |
Out[45]: [276, 295, 306, 316, 321, 429, 499, 778, 858, 879] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment