From 8adf81b4adb602c66fe5663fbc03e1a52892c101 Mon Sep 17 00:00:00 2001 From: Alain Kaiser Date: Fri, 15 Dec 2023 09:00:29 +0100 Subject: [PATCH] wip: removed MaxProduct solution (another problem) from day12 --- AdventOfCode/Day12.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/AdventOfCode/Day12.cs b/AdventOfCode/Day12.cs index 82ed217..b46b796 100644 --- a/AdventOfCode/Day12.cs +++ b/AdventOfCode/Day12.cs @@ -22,8 +22,6 @@ private record Spring(char Value, SpringState State, int Index); public override ValueTask Solve_1() { - Console.WriteLine(MaxProduct([3, 4, 5, 2])); - var records = ParseInput(); var validVariants = 0; @@ -35,22 +33,6 @@ public override ValueTask Solve_1() return new ValueTask(validVariants.ToString()); } - public int MaxProduct(int[] nums) - { - var maxProduct = 0; - - for (var i = 0; i < nums.Length; i++) - { - for (var j = 0; j < nums.Length; j++) - { - if (i == j) continue; - maxProduct = Math.Max((nums[i] - 1) * (nums[j] - 1), maxProduct); - } - } - - return maxProduct; - } - public override ValueTask Solve_2() { return new ValueTask("I don't touch second parts anymore");