Here I will display my solutions (of varying degree) to the advent of code anno 2017!
Go to file
2017-12-04 21:32:39 +01:00
captcha.rb First solution 2017-12-01 21:14:05 +01:00
checksum.rb Slightly prettier 2017-12-02 13:24:48 +01:00
passphrase.rb Day four 2017-12-04 21:32:39 +01:00
README.md Slightly prettier 2017-12-02 13:24:48 +01:00
spirallingdistance.rb Absolutely horrible solution 2017-12-03 14:52:42 +01:00

Advent of code

This repository is dedicated to my attempts at advent of code anno 2017.

Some of the code will be somewhat quick and dirty when I first upload it, since it might be an initial attempt, however things should become somewhat clean after I've rewritten the attempts later.

The 1st of December

For the first challenge, part one, one had to review a sequence of digits and find the sum of all the digits, which match the next digit in the list. This list is circular, thus the last digit will be able to match with the first digit, such that `1221` will have a sum of `3`.

For the second part, one now had to, instead of considering the next digit in the list, consider the digit halfway around the circular list, so `1212` would produce a sum of `6`.

The 2nd of December

For the second challenge, part one, the objective was to look through a bunch of lists, find the maximum and minimum value and then subtract these for each list. In the end, the results of the different subtractions had to be summed up and this would be the result.

For the second part, the calculation of the checksum had changed to now being calculated from finding the only pair of evenly divisible numbers from each list and then sum up the results of the divisions.