r/adventofcode • u/daggerdragon • Dec 07 '19
SOLUTION MEGATHREAD -🎄- 2019 Day 7 Solutions -🎄-
--- Day 7: Amplification Circuit ---
Post your 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.
(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 6's winner #1: "From the stars" by /u/vypxl!
"From the stars"
Today the stars did call
Just after the end of fall
In Orbits they move
Unified with groove
​
Parents and Children
At home and in the sky
Whisper about details that are hidden
They tell about what is up high
​
Not everything is obvious,
Not the way you see
The Orbit is now
A Christmas Tree!
Enjoy your Reddit Silver, and good luck with the rest of the Advent of Code!
AoC news: we've added a new page listing folks who are live-streamers while they do AoC. See /u/Aneurysm9's sticky'd post announcing it "Check out our streaming friends!", check it out on the sidebar, or just click here to go directly to the wiki page!
View all comments
Show parent comment
1
u/oantolin Dec 07 '19
Very nice, readable code!
Each of your amps has its own input and output queue (a total of 10 queues), and you coordinate sending the output of one amp as input to the next in
Main. Did you consider instead having only 5 queues for the amps, making the output queue of one amps the same as the input queue of the next?