AdventOfCode
My solutions for all years of Advent of Code in Python 3 and Rust (by benediktwerner)
aoc2020
Advent of Code 2020 (by ednl)
DISCONTINUED
Our great sponsors
AdventOfCode | aoc2020 | |
---|---|---|
18 | 13 | |
58 | 0 | |
- | - | |
7.7 | 0.0 | |
3 months ago | 6 months ago | |
Python | C | |
Creative Commons Zero v1.0 Universal | MIT 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.
-
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.
- [c++] What's your preferred way to store solutions?
aoc2020
Posts with mentions or reviews of aoc2020.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-06.
-
Need help finding good python solutions
I got all but one star in 2020 when I did it in Python: https://github.com/ednl/aoc2020 but I'm afraid there may be some short variable names despite not doing it for speed.
-
2015-2022: What solution to a problem are you the most proud of
I liked my solution for https://adventofcode.com/2020/day/17 Game of Life in 3D and 4D: https://github.com/ednl/aoc2020/blob/main/day17.py
-
2020 Day 8.2 in Python - trying to figure out how to do this efficiently?
Day 8 runs in 0.02 s using python 3.9 on my M1 Mac Mini. Just flipping in part 2, no special optimisation. My code: https://github.com/ednl/aoc2020/blob/main/day08.py
-
[2020] [Rust] Solving Advent of Code 2020 in under a second
For instance, I wrote this in C for day 15 https://github.com/ednl/aoc2020/blob/main/day15.c which runs in 1.635 s on a Raspberry Pi 4 (4 GB, RPiOS 32-bit on SSD, overclocked to 1.8 GHz) when timing on the command line with "time", taking the lowest "user" value of about 10 manual runs. Compiled with gcc -Ofast (version 8.3.0).
Yep, linked above, or: https://github.com/ednl/aoc2020/blob/main/day15.c
-
[2020] Optimized solutions in C++ (291 ms total)
Day 23 part 2 in 0.06 s on a dual core 1.3 GHz i5 Haswell (2013 MB Air) https://github.com/ednl/aoc2020/blob/main/day23.c because of a simple array as a linked list.
-
[2020 Day *][C99] Computers are fast: AoC 2020 in < 2s, including compile time
Day 23 part 2 (1 million cups, 10 million moves) runs in 0.06 s on my 2013 dual core Haswell i5 1.3 GHz. Main reason is a super fast simulated linked list via a pre-allocated array of integers. Source https://github.com/ednl/aoc2020/blob/main/day23.c
-
-🎄- 2020 Day 24 Solutions -🎄-
Python, Numpy, SciPy Took me a while to figure out how to calculate the new state with different kernels for odd and even rows. In the end, it means doing almost twice the work. Still about 9x faster than the native Python version I did first. Part 2 below, full code at https://github.com/ednl/aoc2020/blob/main/day24alt.py
Thanks to /u/thomasahle for encouraging me to implement axial coordinates, which made it a lot easier. Also thought of a better way to parse the input in one go. And this allowed me to tighten up the grid dimensions. Runs in under a second on a very old laptop, half of which is because of the scipy import ... https://github.com/ednl/aoc2020/blob/main/day24alt2.py
-
-🎄- 2020 Day 23 Solutions -🎄-
Yes, definitely don't create a list for every pick up. No need to insert and delete if you use an array as a linked list. My code: https://github.com/ednl/aoc2020/blob/main/day23.py
What are some alternatives?
When comparing AdventOfCode and aoc2020 you can also consider the following projects:
advent-of-code-2020 - :christmas_tree: My Advent of Code solutions in Rust. http://adventofcode.com/2020
AdventOfCode2020
AOC2020
hac - HAC Ada Compiler - a small, quick Ada compiler fully in Ada
advent_of_code_2021_v2
AoC-2020-solutions - My Python solutions to Advent of Code 2020!
advent-of-code
advent_of_code - #adventOfCode
adventofcode - Advent of Code challenge solutions
Advent-of-Code-2k20
aoc-2020 - Advent of Code 2020