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 })); }
public SortingAlgorithmsBenchmark() { _collection = Generator.CreateRandomList(10000, 10000); _moveBasedInsertionSort = new MoveBasedInsertionSort <int>(); _swapBaseInsertionSort = new SwapBasedInsertionSort <int>(); _mergeSourt = new MergeSort <int>(); _quickSort = new QuickSort <int>(); _randomizedQuickSort = new RandomizedQuickSort <int>(); _countingSort = new CountingSort(); _radixSort = new RadixSort(); _heapSort = new HeapSort <int>(); }