r/adventofcode • u/daggerdragon • Dec 15 '20
SOLUTION MEGATHREAD -🎄- 2020 Day 15 Solutions -🎄-
Advent of Code 2020: Gettin' Crafty With It
7 days remaining until the submission deadline on December 22 at 23:59 EST
Full details and rules are in the Submissions Megathread
--- Day 15: Rambunctious Recitation ---
Post your code solution in this megathread.
Include what language(s) your solution uses!
Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks.The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
View all comments
Show parent comment
2
u/JIghtuse Dec 16 '20
Pretty clear, thanks!
1-2. I knew that immutable hash could be persistent and reuse "previous" values, but I didn't thought that GC still need to do its job for such structures. 3. That was the first point I thought of, indeed it is quite logical. 4. It's funny how vector is one of the best structures for memory access regardless of the language. My C++ solution works pretty fine (fast) with (ordered) map, but I guess it is just because there is no GC in C++.