It took me about an hour, which is pretty damned pathetic, really. About two minutes of that was realizing it was a recursive problem, and 58 minutes was spent debugging it. I'm pretty sure that I could come up with a programming system that would allow me to express this algorithm without being quite so brittle in its implementation. I mean, essentially that's what I want to do in the first place here.
To that end, I'm wondering if I shouldn't start looking for this kind of algorithmic problem and implement more of them. At least I'd stop dithering about whether it was a good use of time or not. I'll bet I could shave most of those 58 minutes off, anyway.
No comments:
Post a Comment