|
After I finally gave in and used regexes for a problem, the second part kinda hurt. So I just created a bracket matcher and deleter. Sometimes everything IS a nail.
|
# ¿ Dec 12, 2015 22:49 |
|
|
# ¿ May 12, 2024 19:54 |
|
Why is the site down just as I decided to procrastinate and code? Also 9 (and 14, duh) is the one that I haven't done yet. Its not hard per se, it will just take some annoying boilerplate I don't care for writing, especially since I want to do it properly. (Construct an ad-hoc graph and then solve it by going from the leaves.)
|
# ¿ Dec 14, 2015 17:01 |
|
Volguus posted:I loving hate Day 12 (was away for a week, catching up now). Phase 1 was able to do without a json parser and no regex's (yet, knock on wood). And it was really simple and clever. And in phase 2 now it makes me either make a json parser, use one or implement some mind-twisting, soul-hating state machine that I'll remember forever in the "what not to do" section of programming experiences. I said it once already, but I just used an ad-hoc brace matcher... C++ code:
|
# ¿ Dec 16, 2015 13:13 |
|
Volguus posted:Yes, and then inbetween you had to find the offending string, then find_start again. I chose to keep a bit of my sanity and just use a drat parser. Eh, the rest of the solution was just using string::find in a loop and a bit more logic to find the ending "}" if applicable. As for day 17, I'd love if the inputs started veering away from brute force. There is a proper and easy algorithm for this, but if I was doing these in Python I'd just brute force it because its easy and the input is insanely small.
|
# ¿ Dec 17, 2015 09:59 |
|
I haven't done it yet, but please tell me that part 2 is Game of Life on a toroidal board.
|
# ¿ Dec 18, 2015 11:00 |
|
|
# ¿ May 12, 2024 19:54 |
|
chutwig posted:Finally had time to return to the problems after a busy December and restart all the way back at problem 7. Having it laid bare that I'm a systems programmer with little knowledge of algorithms is teeth-gritting sometimes, but that makes it all the more gratifying when I get the solution. You are in luck then, most of the problems are either intended to be solved by brute force, or solvable by using brute force because of small problem size.
|
# ¿ Dec 27, 2015 09:56 |