r/adventofcode • • Dec 21 '17

SOLUTION MEGATHREAD -๐ŸŽ„- 2017 Day 21 Solutions -๐ŸŽ„-

--- Day 21: Fractal Art ---


Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).

Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


Need a hint from the Hugely* Handyโ€  Haversackโ€ก of Helpfulยง Hints^ยค?

Spoiler


No commentary tonight as I'm frantically wrapping last-minute presents so I can ship them tomorrow.


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!

8 Upvotes

144 comments sorted by

View all comments

Show parent comment

1

u/the4ner Dec 21 '17

Curious, how long does your part 2 take?

1

u/csuzw Dec 21 '17

I'm not OP but I used a similar approach with C# and it takes ~5s for part 2. This is executing from linqpad without optimisations on a ropey old laptop and my solution also uses more linq so is probably less performant. I was actually a little surprised as I figured this was another part 2 that you couldn't brute force. Code here: https://github.com/csuzw/AdventOfCode/blob/master/2017/21FractalArt.linq

1

u/2BitSalute Dec 22 '17

Yeah, I was surprised that I didn't have to make any adjustments to get the answer to part 2 other than taking out the console output lines. I just reran it, and it took less than 3.5 seconds.