Esempio n. 1
0
        public void TestMethodQuickSort()
        {
            var nums = new int[] { 3, 9, 2, 5, 6, 4, 11, 7, 12 };

            BinarySort.QuickSort(nums, 0, nums.Length - 1);
            CollectionAssert.AreEqual(new int[] { 2, 3, 4, 5, 6, 7, 9, 11, 12 }, nums);
        }
Esempio n. 2
0
 public void TestQuickSort()
 {
     int[] data = new int[] { 7, 3, 8, 2, 5, 6, 0, 1, 9, 4 };
     BinarySort.QuickSort(data, 0, 9);
     foreach (int i in data)
     {
         Console.Write(i + " ");
     }
 }