Exemple #1
0
        public static async Task RunThreeSumBruteForceSolveAsync(string filePathName)
        {
            var ints = await DataLoading.GetIntArrayFromFileAsync(filePathName);

            await ConsoleLogAsync($"Starting {ThreeSumBruteForce}...");

            var sw            = Stopwatch.StartNew();
            var solutionCount = ThreeSum.BruteForceSolve(input: ints, targetSum: ThreeSumBruteForceTargetSum);

            sw.Stop();

            await ConsoleLogAsMicrosecondsAsync($"{ThreeSumBruteForce} found {solutionCount} solutions for target sum {ThreeSumBruteForceTargetSum} in", sw);
        }