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

Show parent comment

3

u/jayfoad Dec 08 '21

Update: here's a much simpler definition for f, which does the same job of stably reordering the rows regardless of how the columns are permuted: fโ†{โต[โ‹+/+/ยจโˆ˜.โˆงโจโต]}

1

u/voidhawk42 Dec 08 '21

This is awesome, nice work!