AdventOfCode
My solutions for all years of Advent of Code in Python 3 and Rust (by benediktwerner)
advent-of-code-wim
Wim's solutions for https://adventofcode.com/ puzzles (by wimglenn)
Our great sponsors
AdventOfCode | advent-of-code-wim | |
---|---|---|
18 | 17 | |
58 | 33 | |
- | - | |
7.5 | 8.8 | |
6 days ago | 4 months ago | |
Python | Python | |
Creative Commons Zero v1.0 Universal | Do What The F*ck You Want To Public License |
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.
AdventOfCode
Posts with mentions or reviews of AdventOfCode.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-06.
-
[2016 Day 14 (Part 2)][Python] Is there a trick to speed this up?
Here's an example implementation in Rust, using rayon's parallel iterators to automatically distribute the computation of a range of hashes over all available cores. It solves both parts together in around 3 seconds on my M2 MacBook Pro. Single-threaded, it takes around 25s in Rust and 35s in Python.
-
Need help finding good python solutions
Here are mine: https://github.com/benediktwerner/AdventOfCode
- [2022 All Days]
-
Running time goals (more of a survey question)
I love doing optimizations like this but I don't really have enough time anymore to really do it. In 2020 I spent a fair amount of time writing super optimized solutions for the first 10 or so days (repo solving all those days together in 150us i.e. <1ms) but even back then, I eventually stopped since I had other things to do and it took more and more time as the days went on.
- [2022 Day 8] Anyone have a solution that doesnt have a separate function for every direction?
-
-🎄- 2022 Day 5 Solutions -🎄-
Python 3 116/125
-
-🎄- 2021 Day 24 Solutions -🎄-
Wow, my final solution looks almost exactly the same. Though I calculated my initial answers by hand.
-
[2021 Day 18] When you check the leaderboard first and see most people taking 30+ minutes
That's certainly not necessary though and really not what makes most of the speed, especially for problems like today's. I don't really look at other leaderboard competitor's solutions much but at least my solutions (ranked ~20 today) are almost always completely vanilla Python (the only exception is networkx for the occasional graph problem but even that isn't really that much of a speedup if you know the common graph algorithms) and always self-contained.
-
-🎄- 2021 Day 18 Solutions -🎄-
Interesting approach. I guess mine could be considered a bit nicer, doing it recursively and returning the number to add to the left or right.
-
[2021 Day 15 (Part B)] [Golang] Pretty Organic, If You Ask Me.
My priority Q/heap Dijkstra in Python runs just fine. I don't remember and can't check rn if it was instant or took a second but it definitely wasn't longer than that.
advent-of-code-wim
Posts with mentions or reviews of advent-of-code-wim.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-07.
-
[2023 Day 7] Better Example Input (Not a Spoiler)
Thanks for the extra example. I've added it to my CI and test suite in https://github.com/wimglenn/advent-of-code-wim/pull/89
-
-❄️- 2023 Day 7 Solutions -❄️-
Full code here
-
Running time goals (more of a survey question)
I'm using Python so I'll never be as fast as the people using Rust or C, but am still able to solve most puzzles in under 1 second (repo: https://github.com/wimglenn/advent-of-code-wim).
-
[2022 Day 14] Low budget terminal vis of the example data
Thanks for the kind words, well the source is here so you can just take a look. You have to run with var AOC_DEBUG=1 in env to enable the rendering.
-
[2022 Day 12] Is there any A* heuristic which makes things better, not worse?
I used an AStar pathfinder already prepared from earlier years (aoc2022/q12.py), just leaving the default null heuristic. If I understand correctly that is just a BFS.
-
[2022 Day 10] AoC OCR
https://github.com/wimglenn/advent-of-code-wim/blob/main/aoc_wim/ocr.py has nearly all the letters we've seen (including a larger font used once in 2018) although it is missing the 5-wide Y that was in my 2016-day 08 puzzle
-
-🎄- 2022 Day 7 Solutions -🎄-
By the way, I found that if you're willing to use pathlib and a guard, you actually only need 2 of those 6 case statements - it looks like this.
-
-🎄- 2022 Day 5 Solutions -🎄-
Python (repo). I was particularly pleased with how quick the parsing was.
-
-🎄- 2021 Day 13 Solutions -🎄-
Python + "AOCR" + complex numbers.
-
-🎄- 2021 Day 9 Solutions -🎄-
Python
What are some alternatives?
When comparing AdventOfCode and advent-of-code-wim you can also consider the following projects:
advent-of-code-2020 - :christmas_tree: My Advent of Code solutions in Rust. http://adventofcode.com/2020
AlgorithmProblems - Solutions to Algorithm Problems :chart_with_upwards_trend: :neckbeard:
advent_of_code_2021_v2
adventofcode
advent-of-code
AdventOfCode2022 - Repository for advent of code code to find solutions. This year in Go.
adventofcode - Advent of Code challenge solutions
advent-of-code - Advent of Code 2022
AOC2021-in-Fortran - Advent of Code 2021 solutions in Fortran
advent-of-code - Advent of Code with JS
adventofcode - :christmas_tree: Advent of Code (2015-2023) in C#
advent-of-code
AdventOfCode vs advent-of-code-2020
advent-of-code-wim vs AlgorithmProblems
AdventOfCode vs advent_of_code_2021_v2
advent-of-code-wim vs adventofcode
AdventOfCode vs advent-of-code
advent-of-code-wim vs AdventOfCode2022
AdventOfCode vs adventofcode
advent-of-code-wim vs advent-of-code
AdventOfCode vs AOC2021-in-Fortran
advent-of-code-wim vs advent-of-code
AdventOfCode vs adventofcode
advent-of-code-wim vs advent-of-code