C源码:\n//*冒泡 升级双向 排序*/
// 交换数组元素位置\n
void Swap(int *num_a, int *num_b)
{ int temp = *num_b;
*num_b = *num_a;
*num_a = temp;
}
static void SwapCS(ref int a, ref int b)//c# 引用非指针
{
int temp = b;
b = a;
a = temp;
}
public static int[] KSsort(int[] a, int start, int end)
{
bool flag = true;
while (end != start)
{
if (flag)
{
int tempend = a.Length - 1;
while (start < tempend)
{
if (a[start] > a[tempend])//右侧找比自己小的数
&nbs