字符串的数组使用计数排序来解决:
字符串数组的计数排序实现:
public static void CountSort(char[]array)
{
int[]temp=new int[300];
for(int index=;index<array.Length;index++)
{
temp[array[index]]++;
}
int n=0;
for(int index=0;index<temp.Length;index++)
{
while(temp[array[index]]-->0)
{
array[n++]=(char)index;
}
}