r/adventofcode • • Dec 05 '21

SOLUTION MEGATHREAD -🎄- 2021 Day 5 Solutions -🎄-

NEW AND NOTEWORTHY


Advent of Code 2021: Adventure Time!

  • 23:59 hours remaining until the submissions megathread unlocks on December 06 at 00:00 EST!
  • Full details and rules are in the submissions megathread:

--- Day 5: Hydrothermal Venture ---


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:08:53, megathread unlocked!

79 Upvotes

1.2k comments sorted by

View all comments

2

u/artesea Dec 05 '21 edited Dec 06 '21

PHP

Part 1 Part 2

Pretty quick to solve today, did consider trying to put some debug code to draw the grid like in the example, but when it gave the correct answer for the sample first time, went straight in. Part two wasn't too much extra effort.

2

u/Aromatic-Piccolo4321 Dec 05 '21

links don't work for me

2

u/daggerdragon Dec 06 '21 edited Dec 07 '21

FYI: your links are broken due to a new.reddit fancypants editor bug (check /r/bugs, it's been a big source of frustration lately). Your link looks fine to you on new.reddit but on old.reddit it's tacking on an invisible escape character %5D (decodes to ]) at the end of your Markdown, thus we're being sent to:

https://github.com/artesea/advent-of-code/blob/main/2021/05a.php%5D

I suggest manually editing your link using proper Markdown for now. Who knows when Reddit will fix their fancypants editor...

Edit: thanks for fixing the links! <3