Skip to content

Instantly share code, notes, and snippets.

@qnighy
Created February 6, 2011 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qnighy/813142 to your computer and use it in GitHub Desktop.
Save qnighy/813142 to your computer and use it in GitHub Desktop.
{
// int s = 5000; // 0.016
// int s = 10000; // 0.047
// int s = 20000; // 0.203
// int s = 40000; // 0.703
int s = 80000; // exceeded
int[] a = new int[s];
for(int i = 0; i < s; i++) {
a[i] = a[i/2];
a[i/2] = i;
}
// Array.Sort(a,new Dum(a));
Array.Sort(a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment