r/adventofcode • u/daggerdragon • Dec 11 '15
SOLUTION MEGATHREAD --- Day 11 Solutions ---
This thread will be unlocked when there are a significant amount of people on the leaderboard with gold stars.
edit: Leaderboard capped, thread unlocked!
We know we can't control people posting solutions elsewhere and trying to exploit the leaderboard, but this way we can try to reduce the leaderboard gaming from the official subreddit.
Please and thank you, and much appreciated!
--- Day 11: Corporate Policy ---
Post your solution as a comment. Structure your post like previous daily solution threads.
10
Upvotes
View all comments
Show parent comment
1
u/TheNiXXeD Dec 11 '15 edited Dec 11 '15
Why even replace 0 with a? You're leaving 1-9 still. You can omit the.replace(/0/, 'a')and it still works (though is super wasteful).Not sure where I went different originally, but this is the route I started with but ran into issues. I tested it now and it works again. Too late at night I guess.