2 ms·
I just realized the dumbsort algorithm at the bottom has an error; it should read: for (int i = 1; i < n; i++) if (x[i-1] > x[i]) swap(
by kragen 8y ago
I just realized the dumbsort algorithm at the bottom has an error; it should read:
for (int i = 1; i < n; i++)
if (x[i-1] > x[i])
swap(i-1, i), i = 0;