public Sorting() { LoadScores(); bubble.bubbleSort(scores); Continue(); insert.insertionSort(scores); Continue(); select.selectionSort(scores); Continue(); heap.heapSort(scores); Continue(); quick.quickSort(scores); Continue(); merge.mergeSort(scores); Continue(); Summary(); ReadKey(true); }
public static void Main(string[] args) { QuickSort qSorter = new QuickSort(); int[] test = { 3, 4, 1, 10, 50, 5, 100, -3, 0 }; string before = ""; for (int i = 0; i < test.Length; i++) { before += test[i] + " "; } Console.WriteLine("before: {0}", before); qSorter.quickSort(test, 0, test.Length - 1); string after = ""; for (int i = 0; i < test.Length; i++) { after += test[i] + " "; } Console.WriteLine("after: {0}", after); }