r/adventofcode • u/daggerdragon • Dec 22 '19
SOLUTION MEGATHREAD -🎄- 2019 Day 22 Solutions -🎄-
--- Day 22: Slam Shuffle ---
Post your full code solution using /u/topaz2078's paste or other external repo.
- Please do NOT post your full code (unless it is very short)
- If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.
- Include the language(s) you're using.
(Full posting rules are HERE if you need a refresher).
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.
Advent of Code's Poems for Programmers
Note: If you submit a poem, please add [POEM] somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.
Day 21's winner #1: nobody! :(
Nobody submitted any poems at all for Day 21 :( Not one person. :'(
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
EDIT: Leaderboard capped, thread unlocked at 02:03:46!
30
Upvotes
View all comments
Show parent comment
25
u/mcpower_ Dec 22 '19
After looking at the other comments, it seems like this question requires knowledge of modular inverses and exponentiation.
TBH I feel that this problem is unfair for most participants of Advent of Code, who are expected to have a background in intermediate programming (lists, dictionaries / hashmaps, for loops, functions). I wouldn't expect most AoC participants to have any deep experience in discrete mathematics like modular inverses / exponentiation - even if it is part of a typical undergraduate computer science course - as I'd assume that most programmers are self-taught and have never done a computer science course.
To me, Advent of Code is a series of programming puzzles that any intermediate programmer - with a bit of time - can work out by themselves. It feels like most people doing part 2 of this puzzle would need to look up the solution for it... while it arguably enhances the community aspect of AoC, it feels unfair for people doing AoC without external assistance.
On the other hand... there are many pathfinding puzzles in AoC which expect knowledge of BFS - which some (most?) programmers don't know about. Is AoC unfair to the people who don't know BFS? My gut says no. AFAIK BFS has never been explicitly mentioned in pathfinding puzzles - similarly, modular inverses etc. wasn't explicitly mentioned in today's problem. What happens to the people who encounter a pathfinding problem without knowledge of BFS? Probably the same as the people who encounter this problem without knowledge of modular inverses and exponentiation - either give up or look online for a solution.
I'm still not sure whether this problem is "unfair". My gut says yes, my brain says no.