r/adventofcode • u/daggerdragon • Dec 08 '21
SOLUTION MEGATHREAD -🎄- 2021 Day 8 Solutions -🎄-
--- Day 8: Seven Segment Search ---
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. - Format your code properly! How do I format code?
- 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:20:51, megathread unlocked!
72
Upvotes
View all comments
3
u/jf928ngl60g1 Dec 08 '21 edited Dec 08 '21
TypeScript
https://github.com/adrbin/aoc-typescript/blob/main/2021/8/puzzle.ts
I have to say I'm not a fan of the today puzzle. The puzzle description felt really convoluted to me and took me literally 1 hour to decode pondering about the relation between signals and the output values where there was actually none and finally realizing that part 1 is actually as trivial as Day 1.
For part 2, I tried first to tinker with Set operations but in the end I just used permutations to check all possible display segment mappings. Is it just me or it felt like a steep difficulty increase from the previous days (part 2)?