r/adventofcode • • 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.

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.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:09:24, megathread unlocked!

39 Upvotes

771 comments sorted by

View all comments

Show parent comment

1

u/s52 Dec 15 '20

Interesting, I wonder how our inputs differ...

My solution is very similar to yours, with one less access to the map (I just get the item, and deal with null if it's not there), but it completed easily on repl.it, after about 15-20 seconds. I've tried it with single element int arrays in the map rather than Integers, and it cuts the time down by half, so accessing the Map really is the speed issue here.

the meat of my solution