static void Main(string[] args)
        {
            int[]     arr = { 12, 11, 13, 5, 6, 7 };
            MergeSort ms  = new MergeSort();

            Console.WriteLine("Given Array");
            printArray(arr);
            ms.sort(arr, 0, arr.Length - 1);
            Console.WriteLine("Sorted Array");
            printArray(arr);

            Console.Read();
        }
Esempio n. 2
0
        // Driver method
        static void Main(String[] args)
        {
            int[] arr = { 12, 11, 13, 5, 6, 7 };

            Console.WriteLine("Given Array");
            printArray(arr);

            MergeSort ob = new MergeSort();

            ob.sort(arr, 0, arr.Length - 1);

            Console.WriteLine("\nSorted array");
            printArray(arr);
        }