static void Main(string[] args) { int[] cc = new int[] { 1, 5, 6, 3, 8, 12, 34, 6, 78, 8, 44, 3, 46, 90, 1, 3, 5, 34, 76, 9, 45 }; int[] bb = new int[] { 1, 13, 15, 20, 3, 14, 15, 16, 21 }; Quick.sort(bb, 0, bb.Length - 1); foreach (var item in bb) { Console.Write(item + ","); } Console.ReadLine(); }
public static void Sort <T>(T[] array) where T : IComparable { KnuthShuffle(array); Quick.Sort(array, 0, array.Length - 1); }