Our great sponsors
-
advent-of-code-cpp
C++ solutions for the Advent of Code programming puzzles - http://adventofcode.com/
-
Second, that's really cool! Here's another VERY short non-memoization that someone helped me with last winter (no way I would have come up with this on my own) https://github.com/djotaku/adventofcode/blob/9602b188d19cbace8491fe59466bbfb7b3a239e0/2020/Day_10/Python/solution_2_from_someone_else.py
-
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.
-
Interestingly, I think that solution is rather near the memoized version in one key regard. It's not memoization, however it's still storing all the results (the count for every joltage adaptor). You can massively reduce its storage by going with something like my solution (C-f for "part 2", there are two solutions one in Common Lisp and one in Ada), which is like the non-memoized iterative fibonacci series (psuedocode, pythonesque):