Refactor Day10 to simplify LINQ usage in `GetButtonCombinations` by removing unnecessary `.Select()`
This commit is contained in:
parent
0d0d1b2150
commit
024eb77fbe
|
|
@ -90,7 +90,7 @@ public class Day10 : IPuzzleSolver<long>
|
|||
{
|
||||
var buttonCombinations = GetButtonCombinations(joltages.Length, buttons)
|
||||
.GroupBy(x => x.Mask)
|
||||
.ToDictionary(x => x.Key, x => x.Select(y => y).ToArray());
|
||||
.ToDictionary(x => x.Key, x => x.ToArray());
|
||||
var res = GetMinCountInternal(joltages, buttonCombinations, new Dictionary<int[], long>(new IntArrayEqualityComparer()));
|
||||
return res;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue