r/adventofcode • u/daggerdragon • Dec 16 '16
SOLUTION MEGATHREAD --- 2016 Day 16 Solutions ---
--- Day 16: Dragon Checksum ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/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".
DRINKING YOUR OVALTINE IS MANDATORY [?]
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!
5
Upvotes
View all comments
Show parent comment
2
u/adventofcodeaddict Dec 16 '16
Similar to my code that almost got me on the board. I think if #101 -> #200 got fractional points (1/2, 1/3, 1/4...) my total would look much better.
I missed the .Substring(0, length) part which cost me points in part1 as I figured out what was wrong.
Then I learnt the hard way that maybe my years of hatred of seeing StringBuilder everywhere were misguided. I had a += "0" etc.. and part 2 took forever, I later changed to StringBuilder and it was near instant. Again, cost me points :-(
My code for a "step" in generating the code is (your notback()):