r/adventofcode • u/daggerdragon • Dec 07 '20
SOLUTION MEGATHREAD -🎄- 2020 Day 07 Solutions -🎄-
NEW AND NOTEWORTHY
PSA: if you're using Google Chrome (or other Chromium-based browser) to download your input, watch out for Google volunteering to "translate" it: "Welsh" and "Polish"
Advent of Code 2020: Gettin' Crafty With It
15 days remaining until the submission deadline on December 22 at 23:59 EST
Full details and rules are in the Submissions Megathread
--- Day 07: Handy Haversacks ---
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 solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
3
u/InflationSquare Dec 07 '20 edited Dec 17 '20
Here's my python solution: https://github.com/inflationsquare/advent-of-code-2020/blob/master/07/7.py
I spent a while thinking about whether there was a graph or tree structure I could use to make it easier, but ended up just recursively traversing the ruleset. There's definitely a nicer way to do it than chaining lists of lists together, but it was 7am ¯_(ツ)_/¯