Refactor Day12 to simplify LINQ usage in `GetMinTotalPresentArea` by replacing `.Select()` with `.Zip()`

This commit is contained in:
Sebastian Lindemeier 2025-12-15 10:21:31 +01:00
parent 4a5eeb8cf0
commit ed3b577516
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ public class Day12 : IPuzzleSolver<long>
private int GetMinTotalPresentArea(int[] presentCounts, int[] presentSizes)
{
return presentCounts
.Select((presentCount, index) => presentCount * presentSizes[index])
.Zip(presentSizes, (count, size) => count * size)
.Sum();
}