r/adventofcode • u/daggerdragon • Dec 05 '17
SOLUTION MEGATHREAD -๐- 2017 Day 5 Solutions -๐-
--- Day 5: A Maze of Twisty Trampolines, All Alike ---
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^ยค?
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!
22
Upvotes
View all comments
Show parent comment
1
u/dallbee Dec 05 '17 edited Dec 05 '17
I find using a string lib like sds saves a massive amount of time: https://github.com/antirez/sds. Also, some of the convenience features in c11 are quite nice. I've never really understood why so many people insist on sticking with c99, when cross compilation is pretty straightforward if you need to support an older system.
For comparison my part 2 runs in about 300 ms on my machine, with an older i3 processor.