AdventOfCode
My solutions for all years of Advent of Code in Python 3 and Rust (by benediktwerner)
adventofcode
Advent of Code challenge solutions (by flwyd)
Our great sponsors
AdventOfCode | adventofcode | |
---|---|---|
18 | 59 | |
58 | 6 | |
- | - | |
7.7 | 8.5 | |
4 months ago | 4 months ago | |
Python | Julia | |
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.
-
[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.
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-12-09.
-
-❄️- 2023 Day 10 Solutions -❄️-
Code on GitHub is currently a mess.
-
[2023 Day 5] Exlplanation Like I'm 5
In the spirit of the Day 5 ALLEZ CUISINE! challenge to ELI5 (Explain Like I'm Five), here's a tasty explanation of how my algorithm works using only a large bucket of Red Vines and a knife. It says to use lined paper, but if you try this at home consider aligning things on a cutting board.
-
-❄️- 2023 Day 4 Solutions -❄️-
[Language: Jsonnet] (on GitHub)
- -🎄- 2022 Day 25 Solutions -🎄-
-
-🎄- 2022 Day 24 Solutions -🎄-
Elixir code, thoughts
-
-🎄- 2022 Day 23 Solutions -🎄-
Elixir 1554/1502 code, reflections
-
-🎄- 2022 Day 21 Solutions -🎄-
Elixir 2506/3402 (24 minutes, 2 hours), code, thoughts
-
-🎄- 2022 Day 20 Solutions -🎄-
Bonus solution in Go (golang) because I was confused about why my Elixir solution didn't work and decided to implement from scratch in case I'd done something dumb. The Go one also got the wrong answer, but took less than 100ms instead of a minute, so I could try out lots of tweaks that didn't change the answer.
-
-🎄- 2022 Day 19 Solutions -🎄-
Elixir 2031/2641 after 3.25/6.5 hours! Code on GitHub
-
-🎄- 2022 Day 18 Solutions -🎄-
I spent time this afternoon sprucing up my helpers for the iex REPL. I spent a bunch of time poking at things in IEx the last couple days and wanted to make sure I would minimize keystrokes if I needed to debug things on my phone while drunk. Turns out Thursday night > Friday night > Saturday night in terms of difficulty, so all those macros have so far saved me zero seconds :-)
What are some alternatives?
When comparing AdventOfCode and adventofcode you can also consider the following projects:
advent-of-code-2020 - :christmas_tree: My Advent of Code solutions in Rust. http://adventofcode.com/2020
adventofcode - Solutions for problems from AdventOfCode.com
advent_of_code_2021_v2
adventofcode - Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala
advent-of-code
aoc2021 - Advent of Code 2021 - my answers
AOC2021-in-Fortran - Advent of Code 2021 solutions in Fortran
AdventOfCode2021.jl - Advent of Code 2021 in Julia
adventofcode - :christmas_tree: Advent of Code (2015-2023) in C#
aoc2021 - Advent of Code 2021 on my homemade 16-bit CPU SCAMP
Advent-of-Code - Advent of Code
AdventOfCode vs advent-of-code-2020
adventofcode vs adventofcode
AdventOfCode vs advent_of_code_2021_v2
adventofcode vs adventofcode
AdventOfCode vs advent-of-code
adventofcode vs aoc2021
AdventOfCode vs AOC2021-in-Fortran
adventofcode vs AdventOfCode2021.jl
AdventOfCode vs adventofcode
adventofcode vs aoc2021
AdventOfCode vs AdventOfCode2021.jl
adventofcode vs Advent-of-Code