Last active
December 10, 2020 07:34
-
-
Save arknave/21b71701de5cc67f38244c608d3b79e0 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
// Say you have an integer array of length n. Then this monstrosity sorts it, slowly. | |
void cursed_sort(int* a, int n) { | |
int*q,i; | |
for(i=0;i<n;++i) | |
for(q=a;q+1<a+n;++q) | |
if(*q>*(q+1)) | |
*q^=*(q+1)^=*q^=*(q+1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment