Exemple #1
0
        public void TestSort()
        {
            var arr = new[] { 3, 41, 52, 26, 38, 57, 9, 49 };

            RandomizedQuickSort.Sort(arr, 0, arr.Length - 1);
            Assert.IsTrue(arr.SequenceEqual(new[] { 3, 9, 26, 38, 41, 49, 52, 57 }));
        }
Exemple #2
0
 public IEnumerable <int> RandomizedQuickSort()
 {
     return(_randomizedQuickSort.Sort(_collection));
 }