Created
June 14, 2023 03:44
-
-
Save purplejacket/4f5678f985e8a1154b3e9e3116ce6a64 to your computer and use it in GitHub Desktop.
sort2.c — see for example "Faster sorting algorithms discovered using deep reinforcement learning" — https://www.nature.com/articles/s41586-023-06004-9
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
void variable_sort_2(int length, int *a) { | |
if(length == 2){ | |
if(a[0] > a[1]){ | |
int temp = a[0]; | |
a[0] = a[1]; | |
a[1] = temp; | |
} | |
} | |
} | |
static int a0[] = {}; | |
int main(void){ | |
variable_sort_2(0, a0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment