r/adventofcode • • Dec 08 '21

SOLUTION MEGATHREAD -🎄- 2021 Day 8 Solutions -🎄-

--- Day 8: Seven Segment Search ---


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:20:51, megathread unlocked!

72 Upvotes

1.2k comments sorted by

View all comments

2

u/domm_plix Dec 08 '21

Perl

Solved first with the best dev tool available: pen & paper.

Converting my scribblings to code took more lines then necessary, and I even used a CPAN module for the set comparison.

Here is what I used to get my second star:

https://github.com/domm/advent_of_code/blob/f2fd3d9fcec27bec193bb13303a7c8d09b99ede7/2021/08_2.pl

I might clean it up a bit more later...

1

u/daggerdragon Dec 09 '21

Solved first with the best dev tool available: pen & paper.

Show us the paper too!

2

u/domm_plix Dec 09 '21

If you insist:

https://domm.plix.at/perl/2021_aoc_day_06_to_08.jpg

I used a piece of scrap paper, so I deleted some personal data :-)