-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
adventOfCode
Solutions to the 'Advent of Code' (http://adventofcode.com) programming challenges in Elm (by jwoLondon)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
advent-of-code-go
All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022
-
AdventOfCode2020
My solutions for Advent of Code 2020 in Python. I try to write solutions as elegant, readable and Pythonic as possible. (by 0xVector)
-
Advent-of-Code-2020
Advent of Code 2020 written in C++ using VS code with WSL integration. (by daniel-meilak)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
TypeScript
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
So, the only sensible thing to do was rewrite HashSet for my own use: link
That is what I did for my perl solution and that takes less than 1.5 seconds to do both parts.
I'm also proud that to speed up my thinking through this grid, I literally downloaded the top image on the wikipedia article and rotated it 90 degrees. I knew conceptually that the grid he described was the equivalent to what I was looking at, but thinking through the deltas degrees off was hard, so I made it easier, and checked it in for kicks https://github.com/jackowayed/advent2020/blob/main/24/1920px-Tiling_6_simple.svg.png
This was a satisfying one. I love working with hex grids. I used the similar 3-axis hex representation as day 11, 2017 (but rotated by 90 degrees), and the similar unbounded game of life pattern seen on day 17, 2020 and exactly a year ago on day 24 2019.
Haskell
Other solutions available here.
Python 3, 97/50. code (permalink) & screen recording
JavaScript 789/766
Python runs in .22 seconds.
python
Python, 345/622 (34 sloc)
Go solution 1240/668
Rust [586/1187]
Python3
Python, simple and (hopefully) readable.
On the first look your solution is almost identical to mine
Full solution on GitHub.
Pascal (with visualization in text output!)
Haskell, runs in 600 ms.
Code on Github.
My solutions runs in a couple of seconds by only keeping track of black tiles and their neighbors. So alot of unneeded updates are avoided. My elixir solution.
Python. So many games of life this year. I'm not bothered though :D
Same on GitHub
My solution in Common Lisp.
My Python and Rust solutions, which run in 0.5s and 80ms.
Rust - Super good day today. Almost starting to grok rust. I'm not as great at iterators as many others. ;)
C++ part2 215ms on my laptop
Source code is available here.
Lua 275/174
C++ 269/103
Code here.
Python 376/465. For hex coordinates I was simply using multiples of 2 for values in x axis for even y axis and multiples of 2 - 1 for odd y axis. paste, GitHub, YouTube
Link Struggled at first on how to implement the hexagonal grid, but after a bit of research stumbled across this. Used complex numbers for the offset coordinates (like in day 12), and then pretty much just copy and pasted my day 17.
Python 147/258
Java
Python 929/997
I spent most of the time trying to remember how I had solved 2017 day 11.
Dyalog APL 437/288
Video Explanation Github Link Easy day, got tripped up with some typos in my coordinate system but still pretty quick. Did my best to use yet another different game of life approach so I wouldn't be going over essentially the same code as in the other two.
C# Solution: I keep misreading instructions edition
Solution in C
code for part1 and part2. it's an interesting question. Record black tiles or remove if flipped even times.
Python 3
Cleaned up: https://github.com/encse/adventofcode/blob/master/2020/Day24/Solution.cs
HASKELL
Elixir
J Programming Language
Python3 - simple solution.
Scala solution
Rust: Once you realized that each tile can be represented by a 2-D point, part 2 is easier than Day17 part2.
Java - github
RegExp + Doubled coordinates + Day 17 solution for part 2
Python3 in notebook
Code: https://github.com/lulugo19/advent-of-code-2020/blob/main/src/day24.rs
Python with visualisation https://github.com/p88h/aoc2020/blob/main/vis/day24.py
Really happy with this solution. Borrowed Hex code from pmcsx/hexgrid which I guess is a lil naughty, but I was pleased with my execution time of around 300ms for Part 2 and around 600us for Part 1. Also pleased with the clarity and brevity of my code.
Tried to comment my code as best I could: GitHub day 24 (part 1 and 2) in C++
Golang solution, runs in 0.19s for both parts combined.
Python - again, no ifs, ands, or buts, and only four lines longer than day 17. I'm particularly pleased that, by using complex numbers for the coordinates, navigating the directions can be done with sum.
Code! (Python)
Here's my day 24 in Rust, using SIMD as usual :) (and offset coordinate encoding to make a SIMD-friendly 2-D cell grid)
Perl
C solution: both part
D (dlang) solution. I couldn't find an unordered set in Phobos so I uuh, I improvised : https://github.com/azihassan/advent-of-code-2020/tree/master/24
Part 1 & 2 in 34 sloc with 0.72 Sek. GitHub
Rust. Nothing particularly clever here, but I managed to keep it both pretty short and easy to follow, I think. ~72 lines without tests.