Hacker News new | ask | show | jobs
by mechagodzilla 446 days ago
After being a professional programmer for ~20 years, and recently playing around with leetcode - my main issue with leetcode is that there's almost no overlap between leetcode problems and the problems I actually encounter in the wild. The validation tests often have silly corner cases that force you into a single answer to avoid timing out. It's frequently as much work to understand what the problem is actually asking you as it is to implement a solution. Just like I've found ChatGPT to be pretty mediocre at writing the sort of code I work on, but others swear by it, maybe some peoples' dayjob actually looks like writing leetcode all day? I know a lot of interviewers use it, but it feels so disconnected from actual engineering work.
2 comments

I'm working on sort of 'graph' library. It's litcoding all the way. There are many separate containers and algorithms. The problem to a) write them b) optimize for memory c) optimize for performance d) find a 'good' balance where 'good' is undefined. But it starts with architecture which is based one some estimates of achievable functionality/performance.
My line of work (ML for medical imaging) is pretty dense with leetcodelikes, especially the classic “what’s the best time complexity? Great now whats the best space conplexity”