lud
This topic is about Day 21 of the Advent of Code 2020 .
Thanks to @egze, we have a private leaderboard:
https://adventofcode.com/2020/leaderboard/private/view/39276
The join code is:
39276-eeb74f9a
Trending in Challenges
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
lud
Today was quick and easy, thanks to
MapSetPapey
Yep, mine is a bit verbose maybe but it works so
https://github.com/papey/aoc/commit/a730fc00747f565bb7d622a5c54f1cc11b7a5701
blue_quartz
After the slaughter that is day 20 (which I did solve, but with a sprawling 163 sloc solution
), this was a good detox, and I got to even reuse day 16’s logic a bit too…
I ‘accidentally’ created the relevant map for day 2 while solving for day 1, and the day 16 reuse is for the part where we have a map of values with increasing lengths, so we just need to sort by that and start picking out the correct value for the key.
code-shoily
This would have been easy, got the algorithm right faster than other days. But, I made a small mistake, I used
Map.newon a list of{allergen, items}where I should not have, there were duplicateallergenand theMapconversion kept on showing me a few ingredients less. I did the error in processing the input, not in the actual algorithmscamilleryr
What a difference a day makes - also went with
MapSet- think there are probably ways to optimize parts of this, but after yesterday Im happy to have something that came together nice and quick. Even got the rare feeling of pretty much having solved part 2 because of the way I implemented part 1.I did find it novel to get to use
~wfor parsing the list ingredient list in my parser - don’t think I would ever really use it, but it was kind of funhttps://github.com/camilleryr/advent20/blob/main/lib/day_21.ex
bjorng
Here is my solution.
felix-alonso
Oh, man, that was refreshingly easy. Days 19 and 20 definitely took a toll so this was sanity restoring.
Hallski
Ended up doing this one as well, so much for taking a break
My solution