Advent of Code 2018 - Day 1

Christopher Kruse on December 01, 2018

Originally posted at https://www.ballpointcarrot.net/posts/advent-of-code-2018-1/ - Also, obligatory "first post" points for being my first dev.t... [Read Full]
markdown guide
 

take the input +3, +3, +4, -2, -4. As you run through this the first time, you generate intermediate values of 3, 6, 10, 8 4, and there are now matches within that set

I did not get this point. There is no any match within the set 3, 6, 10, 8, 4, all numbers are different.

Can someone explain me what I missed ?

 

Looks like an unfortunate typo - it should say "and there are no matches within that set." Because it doesn't match, you'll keep the offset, but repeat processing the list - the first two +3 then change the offset to 7 and 10, which finally gives you the second repeat.

Hope that helps!

 

Yep. Now it is clear.
I was confused with the problem statement and had exactly the same confusement as described here: reddit.com/r/adventofcode/comments....

Thanks.

 

Thank you Christopher for the assist, I had almost got it

github.com/rhymes/aoc2018/commit/6...

Tomorrow I'll try to setup a proper Clojure environment on my computer

 

🙌 this is awesome! Super excited to follow along and learn more clojure!

 
 

Nice! I liked how reductions gives you the intermediate steps, but my mind this AM was not going to give me a way to dig through it easily.

Thanks for the snippet - that's really cool and a good read (gonna be following that repo 😁)

 
code of conduct - report abuse