Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
void sort2(int* A, int n)
for (int i = 0; i < n; ++i)
int min = i;
for (int j = i+1; j < n; ++j)
if (A[j] < A[min])
min = j;
int tmp = A[i];
A[i] = A[min];
A[min] = tmp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.