r/javahelp • u/desrtfx Out of Coffee error - System halted • Dec 02 '15
[META] Daily coding challenges for the Advent
For those who haven't yet seen it on other subreddits or on Facebook:
Advent of Code
Has daily coding challenges during the Advent season up to the 25th of December.
Each daily challenge is split in two parts of which the second one is only unlocked after successful completion of the first part.
The challenges are relatively small and fun to make.
Have fun coding!
EDIT
In order to prevent spoilers (that would reduce the fun for the others), please do not post code directly here in the thread, post the code on pastebin, gist, github, bitbucket, or the code hoster of your choice and link here only.
Edit 2: Post stickied for the duration of the Advent of Code to make it easier to find.
View all comments
2
u/desrtfx Out of Coffee error - System halted Dec 12 '15 edited Dec 12 '15
Day 12
Basically the same as /u/TheHorribleTruth's solution with /u/Philboyd_Studge's FileIO and Google GSON.
Edit: Gist updated to use Java 8 streams for the summation.
New summation method:
Required change of DIGITS matcher pattern to:
which is basically the reverse pattern of digits because it acts as a delimiter pattern instead of a matcher pattern.