Skip to content

Commit

Permalink
wip: removed MaxProduct solution (another problem) from day12
Browse files Browse the repository at this point in the history
  • Loading branch information
alainkaiser committed Dec 15, 2023
1 parent 2cc9db2 commit 8adf81b
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions AdventOfCode/Day12.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ private record Spring(char Value, SpringState State, int Index);

public override ValueTask<string> Solve_1()
{
Console.WriteLine(MaxProduct([3, 4, 5, 2]));

var records = ParseInput();
var validVariants = 0;

Expand All @@ -35,22 +33,6 @@ public override ValueTask<string> Solve_1()
return new ValueTask<string>(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<string> Solve_2()
{
return new ValueTask<string>("I don't touch second parts anymore");
Expand Down

0 comments on commit 8adf81b

Please sign in to comment.