r/adventofcode • • Dec 10 '20

SOLUTION MEGATHREAD -🎄- 2020 Day 10 Solutions -🎄-

Advent of Code 2020: Gettin' Crafty With It

  • 12 days remaining until the submission deadline on December 22 at 23:59 EST
  • Full details and rules are in the Submissions Megathread

--- Day 10: Adapter Array ---


Post your solution in this megathread. Include what language(s) your solution uses! If you need a refresher, 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.


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:08:42, megathread unlocked!

69 Upvotes

1.1k comments sorted by

View all comments

Show parent comment

2

u/Historical-Ad2656 Dec 10 '20

Thanks for the reply. However, I am a bit confused as to why the 3 previous adapters sum to the next one?

1

u/j3r3mias Dec 10 '20

This is a pattern that appears when you deal with the number of recursive calls for this type of sequences (n-fibonacci (fibonacci, tribonacci, tetranacci, etc.)). For some sequences, the numbers are not exactly to the sequence but an adaption of that. I only saw the pattern because I considered a path with fully adapters (1, 2, 3, 4, etc) and after that I tested with some gaps and it worked.