小编Rus*_*s B的帖子

了解Quicksort实现

我在浏览不同的quicksort实现时在网上找到了这个代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Quicksort
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create an unsorted array of string elements
            string[] unsorted = { "z","e","x","c","m","q","a"};

            // Print the unsorted array
            for (int i = 0; i < unsorted.Length; i++)
            {
                Console.Write(unsorted[i] + " ");
            }

            Console.WriteLine();

            // Sort the array
            Quicksort(unsorted, 0, unsorted.Length - 1);

            // Print the sorted array
            for (int i = 0; i < unsorted.Length; i++)
            {
                Console.Write(unsorted[i] + …
Run Code Online (Sandbox Code Playgroud)

c# sorting algorithm quicksort

2
推荐指数
1
解决办法
2064
查看次数

标签 统计

algorithm ×1

c# ×1

quicksort ×1

sorting ×1