/aoc2020

Primary LanguagePythonMIT LicenseMIT

Advent of Code 2020

Mix of languages, sometimes with multiple implementations.

Day 1

First implementation in Golang.

Day 2

First implementation in Golang. Went back and did it again in C using mmap because I'd never used it before. Fun times!

Day 3

Python. Nothing too special, except I got a kick out of extending list to make a row that wraps to avoid arithmetic.

Day 4

Python again. I just used regex to validate all the fields because none of the validations looked too complicated. They all fit under 80 chars!

Day 5

Python again. I just replaced F and L with 0s, B and R with 1s and mathed on that. Part 2 gets it's own file and just prints out all of the unoccupied seats and lets me use my human-ness to pick the right answer.

Day 6

First in Python fairly succinctly. Then in Elixir because I wanted to do at least one in a functional-ish language.

Day 7

Prolog. Get rekt. Only done the first part. Second part is gonna have to use another datastructure generated by the parser that maps edges to bag counts. Then I get to descend the tree and stack up a bunch of multiplication. Fun times!