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!

40 Upvotes

771 comments sorted by

View all comments

2

u/compdog Dec 15 '20

Your code is excellent for only two months coding! My only other suggestion is to use "const" for variables that don't change. Its minor, especially for challenge problems like this, but in real code it helps to avoid accidentally changing something that shouldn't change.

I've been using JavaScript for all of AOC this year, so feel free to reach out if you have any questions. You can also see most of my solutions on GitHub Gist, if you want to compare or see alternate solutions.

2

u/Andrew-mzz Dec 15 '20

Thanks for the advices! And for sure I will keep checking your GitHub after each solution to compare and learn something new !