News for hackers. Stuff that matters.
Re:Many Hard LeetCode Problems Are Easy Constraint Problems by qnleigh on Saturday September 13, 2025 @03:30AM (#45230084)
> when a good algorithm that is known to exist

Sure, if a good algorithm exists and is simple to implement, then go for it. But if it is non-trivial, then you have to make a judgement call whether it is worth the trouble to solve in a more optimal way. You acknowledge yourself that that this can take days.

Personally I really have to be disciplined about choosing what to optimize vs what to code up quick-and-dirty. There's always a temptation to write clean, custom solutions because that's more interesting, but it's just not a good use of time for non-performance critical code.

There are no comments on this comment yet.