I usually give myself 30-60 mins to solve. If I can't do it by then I will look up solutions and -study- them (also break it piece by piece and see if I can generalize it for future problems). I would look at solutions even after solving it by myself.
I find that to be the best balance between challenge and learning something new. You will mentally burn yourself out if you keep bashing against the wall for hours or more, not quite a healthy thing to do :)
Meanwhile, people who actually try to compete on this stuff have already developed rich library of specialized algorithms to leap ahead of average programmer. Well, I guess nowadays a lot of it is LLM assisted too.
Yeah, I definitely think there's benefit in seeing others solutions, and in this situation I want to learn from it, if I can ever reason out why it's working.
Certainly using nushell means anything beyond the true basics seems to be beyond most LLMs.
When I first started programming it used to get me down if I couldn't solve these things. But as I've got old and a little more experienced, I can now admit things like AoC are just not my thing. It's like crossword puzzles or low level algos. I find them extremely hard to reason about.
I find that to be the best balance between challenge and learning something new. You will mentally burn yourself out if you keep bashing against the wall for hours or more, not quite a healthy thing to do :)
Meanwhile, people who actually try to compete on this stuff have already developed rich library of specialized algorithms to leap ahead of average programmer. Well, I guess nowadays a lot of it is LLM assisted too.