aoc21
AdventOfCodeCSharp
aoc21 | AdventOfCodeCSharp | |
---|---|---|
4 | 30 | |
2 | 7 | |
- | - | |
0.0 | 8.0 | |
over 1 year ago | about 1 month ago | |
Crystal | C# | |
- | MIT License |
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
-
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 -🎄-
AdventOfCodeCSharp
- -❄️- 2023 Day 11 Solutions -❄️-
- -❄️- 2023 Day 9 Solutions -❄️-
- -🎄- 2022 Day 22 Solutions -🎄-
-
-🎄- 2022 Day 18 Solutions -🎄-
Code Here: https://github.com/Bpendragon/AdventOfCodeCSharp/blob/332e303/AdventOfCode/Solutions/Year2022/Day18-Solution.cs
- -🎄- 2022 Day 15 Solutions -🎄-
- -🎄- 2022 Day 13 Solutions -🎄-
-
-🎄- 2022 Day 12 Solutions -🎄-
C#/Csharp: Code here
- -🎄- 2022 Day 11 Solutions -🎄-
- -🎄- 2022 Day 6 Solutions -🎄-
-
-🎄- 2022 Day 4 Solutions -🎄-
rewrote it as a pair of linq oneliners (sort of, if you ignore parsing, like that's the one thing I wish C# could do better: read ints from files) https://github.com/Bpendragon/AdventOfCodeCSharp/blob/0800b/AdventOfCode/Solutions/Year2022/Day04-Solution.cs
What are some alternatives?
nom - Rust parser combinator framework
Advent-of-Code-2021 - Did somebody say Shakespeare Programming Language?
Advent-of-Code - Advent of Code
Advent_of_Code_2021_Solutions_Java - Personal AoC/2021 Solutions in Java
aoc
advent-2022-kotlin - :christmas_tree: Advent of Code 2022: Solutions in Kotlin
adventOfCode2022
hello-world - Innocent first test.
advent-of-code-2022
advent_of_code - Advent of Code 2015 written in rust
advent-of-code-2022 - Repo containing solutions for Advent of Code 2022
Advent_of_Code_in_Pascal - My solutions to the Advent of Code, in Free Pascal