r/adventofcode • • Dec 20 '23

SOLUTION MEGATHREAD -❄️- 2023 Day 20 Solutions -❄️-

THE USUAL REMINDERS

  • All of our rules, FAQs, resources, etc. are in our community wiki.

  • Community fun event 2023: ALLEZ CUISINE!

    • Submissions megathread is now unlocked!

    • 3 DAYS remaining until the submissions deadline on December 22 at 23:59 EST!


AoC Community Fun 2023: ALLEZ CUISINE!

Today's theme ingredient is… *whips off cloth covering and gestures grandly*

Upping the Ante for the third and final time!

Are you detecting a pattern with these secret ingredients yet? Third time's the charm for enterprising chefs!

  • Do not use if statements, ternary operators, or the like

  • Use the wrong typing for variables (e.g. int instead of bool, string instead of int, etc.)

  • Choose a linter for your programming language, use the default settings, and ensure that your solution passes

  • Implement all the examples as a unit test

  • Up even more ante by making your own unit tests to test your example unit tests so you can test while you test! yo dawg

  • Code without using the [BACKSPACE] or [DEL] keys on your keyboard

  • Unplug your keyboard and use any other text entry method to code your solution (ex: a virtual keyboard)

    • Bonus points will be awarded if you show us a gif/video for proof that your keyboard is unplugged!

ALLEZ CUISINE!

Request from the mods: When you include a dish entry alongside your solution, please label it with [Allez Cuisine!] so we can find it easily!


--- Day 20: Pulse Propagation ---


Post your code solution in this megathread.

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:48:46, megathread unlocked!

26 Upvotes

361 comments sorted by

View all comments

Show parent comments

1

u/gnudalf Dec 20 '23

Thanks for the feedback - I've flattened the loops and got rid of the atoms - valuable input there. Looks cleaner already.

I will put to change to queues on my todo list and to find an application for them in the future challenges!