Solutions for Advent of Code
I brainfarted and had a hard time trying to understand the instructions. > Incrementing is just like counting with numbers: xx, xy, xz, ya, yb, and so on. Increase the rightmost letter one step; if it was z, it wraps around to a, and repeat with the next letter to the left until one doesn't wrap around. I only managed to understand it by looking at solutions on the subreddit, figuring out the correct behavior: az -> ba, azzz -> baaa, azzzzz -> baaaaa etc. I also sped up the test case containing `ghi` as initial password, by looking for the leftmost invalid I, L or O and increase it, replacing all following chars with `a`. ghijklmn -> ghjaaaaa. |
||
|---|---|---|
| 2015-elixir | ||
| 2015-elixir-2 | ||
| 2015-python | ||
| 2016-python | ||
| 2017-python | ||
| 2018-elixir | ||
| 2018-python | ||
| 2019-elixir | ||
| 2020-elixir | ||
| 2020-python | ||
| 2021-elixir | ||
| 2021-python | ||
| 2022-elixir | ||
| .gitignore | ||
| README.md | ||
Advent of Code 2015–
Here all solved puzzles for Advent of Code are kept for reference. Most solutions are written in Python, but there are also solutions written in Elixir.
- 2016–2020 are squashed in version control, so the original thoughts/rants about the solution are forgotten for future generations.
- 2021 onwards will have each solution as a separate commit.