Refactor Day10 to simplify lamp parsing by removing redundant `.Index()` call and unnecessary LINQ chain
This commit is contained in:
parent
0359bacf47
commit
ee061757a8
|
|
@ -23,9 +23,8 @@ public class Day10 : IPuzzleSolver<long>
|
|||
.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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue