Esempio n. 1
0
 static void Main(string[] args)
 {
     for (var nbBooks = 1; nbBooks < 100; nbBooks++)
     {
         Console.WriteLine($"--------------- {nbBooks} -----------------");
         var books = new List <Books>();
         _strategy.Generate(books, nbBooks);
         _strategy.Reset();
     }
     Console.WriteLine("DONE");
     Console.ReadLine();
 }
Esempio n. 2
0
        public void TestSortingAlgorithm()
        {
            sw = new Stopwatch();
            sw.Start();

            N = 10_000;
            GenerateStrategy.Generate(ref Array, N);

            if (N <= 20)
            {
                Print();
            }
            Sort();
            if (N <= 20)
            {
                Print();
            }

            sw.Stop();
            Console.WriteLine($"Algorithm: '{AlgorithmName}' Total time: {sw.ElapsedTicks} ");
        }