Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            MergeSort     mergeSort     = new MergeSort();
            SelectionSort selectionSort = new SelectionSort();
            InsertionSort insertionSort = new InsertionSort();
            BubbleSort    bubbleSort    = new BubbleSort();
            CountingSort  countingSort  = new CountingSort();
            QuickSort     quickSort     = new QuickSort();

            mergeSort.Execute();
            selectionSort.Execute();
            insertionSort.Execute();
            bubbleSort.Execute();
            countingSort.Execute();
            quickSort.Execute();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main()
        {
            // Sorting algorithms
            SortAlgorithm ms = new MergeSort();
            SortAlgorithm qs = new QuickSort();

            //SortingVisualiser visualiser = new SortingVisualiser(ap.getDataForAlgorithm().getData());
            //qs.setNumberSwapListener(visualiser);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            SortAnimatorGUI sortAnimator = new SortAnimatorGUI();
            qs.setNumberSwapListener(sortAnimator);
            sortAnimator.Show();

            GUI sortGui = new GUI(qs);
            sortGui.setProblemChangedListener(sortAnimator);

            Application.Run(sortGui);
        }