aoc21
Advent of code 2021. (by yxhuvud)
advent-of-code
Advent of Code Solutions (by karjonas)
aoc21 | advent-of-code | |
---|---|---|
4 | 6 | |
2 | 2 | |
- | - | |
0.0 | 6.6 | |
over 1 year ago | 5 months ago | |
Crystal | Rust | |
- | - |
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.
aoc21
Posts with mentions or reviews of aoc21.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-02-17.
-
Advent of Code Day 24: Computing with Sets
The way I solved this was by squinting a little and realizing that every time a div instruction happened, then a certain number following it needed to be 0, depending on the value of certain constants embedded in the code, and also on certain other fields in the input. So instead of starting with an input number, it is possible to calculate the min and max values the fields may contain right there, as long as we embed the field positions in a stack.
As this is only going through the code once, this is virtually instantaneous and ended up as the day that was fastest of all days to compute.
https://github.com/yxhuvud/aoc21/blob/main/day24.cr
-
[2021] Solving AoC with Rust before Python can start
My solution, https://github.com/yxhuvud/aoc21/blob/main/all_days.cr :
-
Speeding up Dijkstra by a factor of 2700
Yes, though sometimes it is possible to replace a fully general priority queue with a faster structure that is using the structure of the problem at hand. For example, this problem (AoC day 15) has only ever a count of unique priorities that is 10 or fewer. That allows a queue implementation to be https://github.com/yxhuvud/aoc21/blob/main/day15.cr#L27-L51 , being amortized O(1) in both insertion and deletion. This pushed down the runtime another magnitude for me, the whole day running at 0.014s.
- -🎄- 2021 Day 18 Solutions -🎄-
advent-of-code
Posts with mentions or reviews of advent-of-code.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-21.
-
-🎄- 2021 Day 22 Solutions -🎄-
Rust GitHub. My approach is to go through all cuboids and always remove their intersection with all previously added cuboids. Then, If it is a "on" cuboid it is added to the list of cuboids. This way no cuboids will overlap and I can sum all their volumes in the end.
-
-🎄- 2021 Day 19 Solutions -🎄-
Rust GitHub. Kinda ugly brute force solution which runs in ~10 sec.
-
-🎄- 2021 Day 18 Solutions -🎄-
Rust GitHub. This took me much longer that I care to admit. I started with a tree-based solution, tried a list, went back to tree and the back to the list again...
-
-🎄- 2021 Day 6 Solutions -🎄-
Rust GitHub
-
2020 Day 21 Solutions
GitHub.
-
2020 Day 20 Solutions
Rust GitHub. This took a very long time to solve, and the code is not very nice looking.
What are some alternatives?
When comparing aoc21 and advent-of-code you can also consider the following projects:
nom - Rust parser combinator framework
aoc2021 - My solutions for the 2021 Advent of Code
Advent-of-Code - Advent of Code
Advent-of-Code - My solutions for the Advent of Code puzzles (work in progress).
aoc
AdventOfCode2021
AdventOfCode2021.jl - Advent of Code 2021 in Julia
adventofcode - :christmas_tree: Advent of Code (2015-2023) in C#
adventofcode - Solutions for problems from AdventOfCode.com
aoc2021 - Advent of Code 2021
AoC - my personal repo for the advent of code yearly challenge
aoc21 vs nom
advent-of-code vs aoc2021
aoc21 vs Advent-of-Code
advent-of-code vs Advent-of-Code
aoc21 vs aoc
advent-of-code vs AdventOfCode2021
advent-of-code vs AdventOfCode2021.jl
advent-of-code vs adventofcode
advent-of-code vs adventofcode
advent-of-code vs aoc2021
advent-of-code vs AoC
advent-of-code vs Advent-of-Code