1
0
Fork 0
advent-of-code/2020/02
2022-09-21 09:19:52 -04:00
..
input.txt solve: day 2, part 1 2022-09-21 09:19:52 -04:00
part1.hs solve: day 2, part 1 2022-09-21 09:19:52 -04:00
part2.hs fix: remove out-of-bound/Maybe from day 2 part 2 2022-09-21 09:19:52 -04:00
README.md fix: remove out-of-bound/Maybe from day 2 part 2 2022-09-21 09:19:52 -04:00

Day 2

Part 1

Spent some time reading up on how to define a custom instance of Read. Pretty simple otherwise. Surprised countElem isn't in Prelude.

Part 2

Off-by-one errors were called out in the puzzle but I still made them. Solution can be simplified if I don't need to check for out-of-bounds issues. I did this.