RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
C#快速排序源码演示

如下的资料是关于C#快速排序演示的代码,应该对各位朋友有用处。

成都创新互联专业成都网站设计、网站建设,集网站策划、网站设计、网站制作于一体,网站seo、网站优化、网站营销、软文营销等专业人才根据搜索规律编程设计,让网站在运行后,在搜索中有好的表现,专业设计制作为您带来效益的网站!让网站建设为您创造效益。

private static int Partition (int[] list, int i, int j)
{
    int Key = list [i];

    while (i < j)
    {
        while (list [j] >= Key && i < j)
            j--;

        if(i< j)
            list [i++] = list [j];

        while (list [i] <= Key && i < j)
            i++;

        IF (i < j)
            list [j--] = list[i];
    }

    list [i] = Key;
    return i;
}
public static void QuickSort (int[] list, int low, int high)
{
    if(low < high - 1)
    {
        int Key = Partition (list, low, high);
        QuickSort (list, low, Key - 1);
        QuickSort (list, Key + 1, high);
    }
}

分享题目:C#快速排序源码演示
网站路径:http://scyingshan.cn/article/pehedg.html