网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

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://bjjierui.cn/article/pehedg.html

其他资讯