Beispiel #1
0
        private static void ComposeBinarySearchSpeedTest(int[] arrayOfNumbers)
        {
            SaveToFile file = new SaveToFile("BinarySearchSpeedTest.csv");

            BinarySearch binarySearchSpeedTest = new BinarySearch(arrayOfNumbers);

            for (int i = 1; i <= 28; i++)
            {
                binarySearchSpeedTest.SetNumberToFind(ArrayLength / 2);

                double time = binarySearchSpeedTest.AlgorithmSpeedTest();

                string stream = $"{i}; {time}";

                file.SetStream(stream);
                Console.WriteLine(stream);
            }

            file.Save();
        }