A bit disappointed with Day 20 of AoC. The Stack ...
# advent-of-code
a
A bit disappointed with Day 20 of AoC. The Stack + Dynamic Programming approach to parse the Path only works if you assume that each subpath returns the branch point, that sounds like a massive assumption to me. I spent ages attempting to parse the path using a recursive descent parser to generate the maze (& still failed 😭). Day 21 is back to Elf Assembly Language & the problem statement seems a bit vague which has not really lightened my mood.
k
Did the parsing not work or the generating-the-maze?
a
It was the parsing, I failed to generate the Tree structure properly.
s
I have written a recursive descent parser for it. My solution is posted above if you want to have a look.
a
Ok, will check it out. Thanks
k
I've got one too, using a Queue instead of advancing the input yourself simple smile
s
Yes, I've just checked out your solution. Much cleaner in my opinion 🙂. I just went braindead, simply writing the accept/expect functions I've written a few times already.
a
Think I'm getting too old or tired for AoC this year. The last few days have fried my brain.