From ee061757a8189ee269bd8d38b73d9d322217a961 Mon Sep 17 00:00:00 2001 From: Sebastian Lindemeier Date: Mon, 15 Dec 2025 10:28:06 +0100 Subject: [PATCH] Refactor Day10 to simplify lamp parsing by removing redundant `.Index()` call and unnecessary LINQ chain --- AoC_2025/Day10.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/AoC_2025/Day10.cs b/AoC_2025/Day10.cs index 33694c8..8f97f73 100644 --- a/AoC_2025/Day10.cs +++ b/AoC_2025/Day10.cs @@ -23,9 +23,8 @@ public class Day10 : IPuzzleSolver .ToArray(); var lamps = puzzleInput .Select(input => input.lamps) - .Select(lamps => lamps.Index()) - .Select(ixlamps => - ixlamps.Select(ixlamp => ixlamp.Item == '#').ToArray()) + .Select(lamps => + lamps.Select(lamp => lamp == '#').ToArray()) .ToArray(); var buttons = puzzleInput .Select(input => input.buttons)