1
0
Fork 0
advent-of-code/2020/01
2022-09-21 09:19:52 -04:00
..
input.txt solve: day 1, part 1 2022-09-21 09:19:52 -04:00
part1.hs chore: simplify day 1, part 1 2022-09-21 09:19:52 -04:00
part2.hs chore: simplify day 1, part 2 2022-09-21 09:19:52 -04:00
README.md solve: day 1, part 2 2022-09-21 09:19:52 -04:00

Day 1

Part 1

Took some time to remember how to read input.

I assumed that I could build the list of pairs from the start and never tracing back (order doesn't matter).

Part 2

Have to take the previous solution and deal with combinations of three values.

Hardest part is figuring out how to take a list of numbers and return a list of 3 tuples for the combinations of pairs:

triples xs = sequence $ replicate 3 xs

This produces some additional data but I assume these entries won't be false positives.