aoc2021
solutions for advent of code 2021 (by tumdum)
Advent-of-Code-2021
Made it through all 25 days of Advent of Code for the second time! (by Leftfish)
aoc2021 | Advent-of-Code-2021 | |
---|---|---|
7 | 14 | |
4 | 2 | |
- | - | |
0.0 | 4.3 | |
over 2 years ago | 4 months ago | |
Rust | Python | |
GNU Affero General Public License v3.0 | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
aoc2021
Posts with mentions or reviews of aoc2021.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-23.
-
-π- 2021 Day 24 Solutions -π-
my rust solution:
-
-π- 2021 Day 23 Solutions -π-
my rust solution - runs in ~650ms. All it does is explore all possible move sequences that obey game rules. Ordered by increasing total cost.
-
-π- 2021 Day 21 Solutions -π-
Thanks! In the meantime, I was able to slash the runtime in half by using a faster hash (fxhash) for the cache.
-
[2021] My aim is for all of this years solutions to be sub 1s in total. So far so good.
Same here $ cargo run --release -- --skip-output Finished release [optimized + debuginfo] target(s) in 0.02s Running target/release/aoc21 --skip-output Day 01 took 10.008Β΅s to compute (with i/o: 146.55Β΅s) Day 02 took 9.355Β΅s to compute (with i/o: 87.184Β΅s) Day 03 took 82.134Β΅s to compute (with i/o: 155.095Β΅s) Day 04 took 52.834Β΅s to compute (with i/o: 240.457Β΅s) Day 05 took 673.742Β΅s to compute (with i/o: 776.801Β΅s) Day 06 took 1.306Β΅s to compute (with i/o: 7.122Β΅s) Day 07 took 33.248Β΅s to compute (with i/o: 55.737Β΅s) Day 08 took 984.71Β΅s to compute (with i/o: 1.00838ms) Day 09 took 883.739Β΅s to compute (with i/o: 922.913Β΅s) Day 10 took 19.062Β΅s to compute (with i/o: 126.791Β΅s) Day 11 took 398.191Β΅s to compute (with i/o: 400.35Β΅s)
-
-π- 2021 Day 10 Solutions -π-
rust
-
-π- 2021 Day 9 Solutions -π-
my rust day9:
-
-π- 2021 Day 5 Solutions -π-
my rust solution for day5:
Advent-of-Code-2021
Posts with mentions or reviews of Advent-of-Code-2021.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-06.
-
-π- 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.
What are some alternatives?
When comparing aoc2021 and Advent-of-Code-2021 you can also consider the following projects:
adventofcode - Advent of code solutions
advent-of-code-go - All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022
AdventOfCode2021.jl - Advent of Code 2021 in Julia
aoc2021 - Advent of Code 2021 Solutions
advent-of-code - Advent of Code puzzles
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!
deno_aoc - π Advent of code solutions written in TypeScript for Deno.
Advent-of-Code - Advent of Code
AdventOfCode2021