-
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.
-
Advent-of-Code
A repository holding all of my solutions to Advent of Code problems (by Noble-Mushtak)
-
AdventOfCode
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
advent-of-code-2021
My solutions for Advent of Code 2021: https://adventofcode.com/2021 (by BradonZhang)
-
adventofcode
Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)
-
advent-of-code-2021
Discontinued Code I used for solving https://adventofcode.com/2021 (by pavel1269)
-
AdventOfCode
Hacky solutions for [Advent of Code](https://adventofcode.com), working on past problems (by AllanTaylor314)
-
advent-of-code-2021
My Advent of Code solutions. I prioritize readability over performance where possible. (by tcc-sejohnson)
-
advent-of-code-go
All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Raku and Go 10828/10559 (because I spent about 40 hours thinking that 3D rotation is commutative across axes, until I did a second round of experimenting with a Rubik's cube). The Raku solution runs in about 41 minutes, the Go solution runs in about 41 seconds.
Elixir 3 ms / 1.3 sec
Compile for your CPU. By default rustc compiles for a generic CPU (i.e. a very very old x64), so the compiler does not use all the features availabl ein modern processors. Just add this in your project and you'll get several % improvement.
The rest is the same as my first attempt, but full code at GitHub.
Python3 64/44
Python 3.8.10 82/68
135/99. Python. Video coming soon.
RUST
Python using numba for speed, so part 2 runs in about 200 ms. Kind of nasty that the example code didn't flash...
Code
Clojure (Github). Part 2 runs in ~4.2s (didn't try to optimize anything, if there is even anything to optimize).
Pidgin Python... didn't get the trick filler value in the first place, nasty little Hobbits :( https://github.com/Myxcil/AdventOfCode2021/blob/main/Day20/day20_main.py
Python 2295/2001 - GitHub
Kudos! I tried to do the exact same thing in Python, but I was much slower even with the help of the standard library's functools.cache. (Python, 1680/1482.)
My Scala solution.
Today was quite easy again. The only challenging part in my input was that light pixels surrounded by only light pixels turn dark (and vice versa). github
C#
C# solution (cleaned up)
Python
rust part 1 and 2, since only number of steps were different
both parts (a bit ugly brute force in the "let's expand the range into oblivion until it works" parts)
Kotlin 1948/1806
github link
C#
Python
Python.
Elixir
Ruby
Python 3 using Numpy: https://github.com/HeyHouBenjo/AdventOfCode2021/blob/main/20/20.py
Almost walked away from this when caught out by the "empty" space flipping. But stuck with it and managed to make it work without changing my approach too much.
Code
Solution in Go: kvrhdn/Advent-of-Code//advent-of-code-2021/day20/day20.go
Nice problem today
JavaScript with some optimizations
Kotlin
Scala. Really enjoyed today's puzzle. A classic Game of Life with a little twist
github
Python day 20, code for part 1 also worked for part 2 without any changes.
I've created solutions for all days except day 19 in ABAP. Feel free to take a look at the whole repository. The code is standalone and doesn't require any DDIC types or classes. Just a local file on the application server to read the input from.
C#
Python + SciPy
Haskell: https://github.com/MaT1g3R/advent-of-code-2021/blob/master/day20/src/Lib.hs
TypeScript, simple solution.
I used my Matrix Implementaion, which was usefull in seven puzzles until now :).
Writing in Zig, seems to get around 1.7ms run time for combined part 1 and 2. Not exactly pretty code, and I feel like there has to be better way to do stuff. https://github.com/Kiraffi/aoc2021/blob/main/src/day20.zig
Python: 28 lines and a rather good performance by using numpy, a bool array, and generic filter from ndimage. The generic filter again felt a little bit like cheating :) https://github.com/HrRodan/adventofcode2021/blob/master/day20/day20.py
Full code at Github
Haskell 621/603
F# solution in Jupyter Notebook. Part 1 takes 500ms but Part 2 takes 24s. Any suggestions on where performance could be improved would be appreciated!
Rust
The state of a pixel after 1 step depends on the 3x3 grid around it; The state after 2 steps depends on the 5x5 grid around it etc. (Which is how I initially solved part 1) The state after n steps depends on the (2*n+1)^2 pixels around it. This means that the farthest affected pixels are n pixels away from the initial edge i.e. a 100x100 image enhanced 50 times creates an image that is 200*200 (increased by 50 lines on each of the four sides). Anything outside that range is assumed to be empty after all the steps have been applied (Which is true for any input and number of steps where the answer is finite).
Maybe you can create a benchmarking project where you test both the C# and F# algorithm using benchmarkdotnet?
Day 20
If you're interested, I did a similar thing, also using Numpy, but tried to use numpy's vector methods rather than loops Solution to 2021 Day 20 in Python (using Numpy)
Code here.
Kotlin code - Notes