Advent-of-Code-2021
adventofcode
Our great sponsors
Advent-of-Code-2021 | adventofcode | |
---|---|---|
14 | 55 | |
2 | 20 | |
- | - | |
4.3 | 7.8 | |
4 months ago | 4 months ago | |
Python | Elixir | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Advent-of-Code-2021
-
-π- 2022 Day 7 Solutions -π-
I totally recommend trying - it's going to be a lot of fun and you'll understand the structure better. I'm not a pro and I never studied CS - that's just my experience from last year (day 18).
-
[2021] What did you learn or take away from AoC 2021?
I keep a diary of what I learned, revised or improved at in my repo.
-
-π- 2021 Day 23 Solutions -π-
Python - needs over 45 seconds but WORKS, which is good enough for me after a couple of days, especially given the fact that I can spend at most 1-2 hours a day solving this... The ugliest part are probably the hard-coded distances from rooms to corridors and vice versa, but what the heck, it works.
-
[2021 Day 19] Part 1: count correct for sample, too low for actual + no idea how to find out if orientation is correct
For reference, here's my work-in-progress code (Python). But most imporatntly I want to describe my line of thinking :
-
-π- 2021 Day 18 Solutions -π-
As a complete hobbyist, I was glad I figured out this had something to do with binary trees. It took about an hour to design everything on paper. Then I started to code it...and then debug...and four hours later I finally arrived at this solution.
-
-π- 2021 Day 15 Solutions -π-
Python
-
-π- 2021 Day 14 Solutions -π-
I'm not sure what kind of brainfog descended on me this morning. After part 1 I instantly knew I should just count the pairs and update their numbers but somehow couldn't figure out how to do it. It took me almost an hour before it dawned on me that...wait for it...a pair splits into two pairs. After that and some off-by-one debugging I came up with this solution. Defaultdict for the win.
-
-π- 2021 Day 13 Solutions -π-
Python - two alternative solutions (lines 25-65 and 68-106, not including the parser)
-
[2021 Day 11] Flashing octopi
This is not my first visualisation but for the first time I decided to share one here. It looks worse on screen due to flickering (I print the board and clear the screen after each step). Here's the code.
-
-π- 2021 Day 10 Solutions -π-
Anyway, here's my stack-based Python solution. It could be made way shorter because there's actually no need to store data separately about valid lines (valid == not corrupt and empty stack), but I thought the verbose approach makes the solution a bit more understandable.
adventofcode
-
-βοΈ- 2023 Day 10 Solutions -βοΈ-
Part one went fairly fast, but spent quite some time on getting part two right. I settled on the approach of just iterating over the grid and using a boolean to see if I had to count elements or not. However, I had some issues figuring out when to swap, this post by /u/rogual helped me figure it out. After that I lost quite some time on an error that only occurred with my input, not with the example input. It turned out that my loop (which I take form my p1 solution) didn't include the start node, which caused all sorts of counting issues.
-
-βοΈ- 2023 Day 4 Solutions -βοΈ-
[Language: Elixir] https://github.com/mathsaey/adventofcode/blob/master/lib/2023/4.ex
- -π- 2022 Day 25 Solutions -π-
- -π- 2022 Day 24 Solutions -π-
- -π- 2022 Day 23 Solutions -π-
- -π- 2022 Day 22 Solutions -π-
- -π- 2022 Day 21 Solutions -π-
- -π- 2022 Day 20 Solutions -π-
- -π- 2022 Day 19 Solutions -π-
- -π- 2022 Day 18 Solutions -π-
What are some alternatives?
advent-of-code-go - All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022
AdventOfCode2021 - Advent of code 2021
aoc2021 - Advent of Code 2021 Solutions
adventofcode - Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala
amphibia - It's here! "What is it?" You may ask? It's Amphibiaβ’ of course! It's the Advent of Code 2021 Day 23 simulator you never asked for! Enjoy with a smile please!
adventofcode - Answers to Advent of Code
Advent-of-Code - Advent of Code
aoc2021 - Advent of Code 2021 - my answers
AdventOfCode2021
rockstar - The Rockstar programming language specification
roast - π¦ Raku test suite
aoc2021 - Advent of Code 2021 on my homemade 16-bit CPU SCAMP