I use selection sort, but I want a better sorting solution than this:
static void SelectionSort(int[] a)
{
int temp, pmin;
for (int i=0; i<a.Length-1; i++)
{
pmin=i;
for (int j=i+1; j<a.Length; j++)
if (a[j]<a[pmin])
pmin=j;
temp = a[i];
a[i] = a[pmin];
a[pmin] = temp;
}
}
Just use:
Which will do a QuickSort.