Ejemplo n.º 1
0
        public static void Test_Array_List(int seed)
        {
            int         n       = 10;
            MyDataArray myarray = new MyDataArray(n, seed);

            Console.WriteLine("\n ARRAY \n");
            myarray.Print(n);
            HeapSort(myarray);
            myarray.Print(n);

            MyDataList mylist = new MyDataList(n, seed);

            Console.WriteLine("\n LIST \n");
            mylist.Print(n);
            HeapSort(mylist);
            mylist.Print(n);

            Test_Performance(seed);
        }
Ejemplo n.º 2
0
        public static void TestArray_List(int seed)
        {
            int         n       = 12;
            MyDataArray myArray = new MyDataArray(n, seed);

            Console.WriteLine("---Array---");
            myArray.Print(n);
            Console.WriteLine();
            Console.WriteLine("---HeapSortedArray---");
            HeapSortArray.HeapSortas(myArray);
            myArray.Print(n);
            Console.WriteLine();
            MyDataList myList = new MyDataList(n, seed);

            Console.WriteLine("---List---");
            myList.Print(n);
            Console.WriteLine();
            Console.WriteLine("---HeapSortedList---");
            HeapSortList.HeapSortas(myList);
            myList.Print(n);
            Console.WriteLine();
        }