Ohai, didn't expect anyone to actually read this (I don't think anybody does). Anyways, the past few days of AoC were fun (except for 4) and quick (none of them), and I got a leaderboard to reflect on. Let's get into it.
Day 2: Inventory Management System
We had to break into a warehouse and do checksums. So far so simple. This was actually really simple, all I had to do was use Enum.reduce to find the number of occurences for part 1, and for Part 2 I used Enum.zip to find the non-matching characters.
Day 3: No matter how you slice it
Now that the fabric is found, we have to find the right piece of it. How? All the elves have claims, find the number of fields that are at least claimed twice. Easy? Nope. I couldn't do it as a grid cause immutablility, so I solved this one in scala instead. Mutability is nice sometimes. Part 2 was easily solveable in elixir though, see my code for that.
Day 4: Repose Record
Urgh. Worst one so far. Let's not talk about it.
Day 5: Alchemical Reduction, and a tale of double linked lists
This one was a ton of fun. I first solved it using regex (slowest), and then using infinite recursion (slightly faster). But then, the breakthrough: Using two linked lists at once. I blame Betül for this one, for contributing the amazing idea. Essentially it is to add all elements you have already compared to another list, and to always compare with that list as well. Brought down my execution time from 10 minutes to 1s. wtf i love linked lists now
Day 6: Chronal Coordinates
Oh no, your wristband is broken! Now you'll have to use the manhattan distance to find a safe drop-point. This was also fun, and I thoroughly abused maps and Enum.group. Fun day as well.
We'll see what the future brings. At the moment, I'm ranked first on the elixi.re leaderboard, but that can change at any given time. I'll try to post more, but probably won't.