public static void Part2(List <int> sizes) { var validCombos = AOC.Combinations <int>(sizes).Where(combo => combo.Sum() == 150); int minCount = validCombos.Select(combo => combo.Count()).Min(); int sameCountCombos = validCombos.Where(combo => combo.Count() == minCount).Count(); Console.WriteLine(sameCountCombos); }
public static void Part1(List <int> sizes) { int combinations = AOC.Combinations <int>(sizes).Where(combo => combo.Sum() == 150).Count(); Console.WriteLine(combinations); }