选择排序
class SelectionSorter
{
private int min;
public void Sort(int[] arr)
{
for (int i = ; i < arrLength ; ++i)
{
min = i;
for (int j = i + ; j < arrLength; ++j)
{
if (arr[j] < arr[min])
min = j;
}
int t = arr[min];
arr[min] = arr[i];
arr[i] = t;
}
}
static void Main(string[] args)
{
int[] array = new int[] { };
SelectionSorter s = new SelectionSorter();
sSort(array);
foreach (int m in array)
ConsoleWriteLine({} m);
}
}