sasajuric
Author of Elixir In Action
Note: This topic is to talk about Day 22 of the Advent of Code 2019 .
There is a private leaderboard for elixirforum members. You can join it by following this link and entering the following code:
39276-eeb74f9a
Trending in Challenges
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
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
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
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
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
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
sasajuric
Like many, I had tough time with this one, and wasn’t able to finish part 2 yesterday. It was quite frustrating, because I was partially on the right track, but it turned out that my math knowledge was not sufficient to figure all the needed pieces.
I spent a lot of time reading through the reddit spoilers thread, and I acquired a vague intuition on how to solve it, but I was still confused with bunch of math properties.
Based on that, I got an idea today which seemed relatively simple, and didn’t require the knowledge of formal principles and ideas mentioned on reddit (other than exponentiation by squaring).
You can find my solution here. I’ve provided an elaborate description in moduledoc.
bjorng
I also had a hard time, but I didn’t want to look at any hints or spoilers at reddit, at least not until I had been stuck for at least 24 hours. I used other parts of the Internet, such as WolframAlpha and websites about number theory. As it happened, I continually made slow but steady progress.
My solution contains all four version of the solver algorithm (with comments) I developed during the last few days.