Untitled
unknown
plain_text
3 years ago
250 B
10
Indexable
void sort(int n, int *a) {
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (a[i] > a[j]) {
int t = a[i];
a[i] = a[j];
a[j] = t;
}
}
}
}Editor is loading...