Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The OG LeetCode. Highly recommend, helpful for becoming fluent in a programming language.


I wouldn't. The majority of problems there have mathematical optimizations which real problems never do. Worse if you start thinking in the way those problems encourage you to your programs will be completely invalidated even with a tiny change in the spec.

A good set of questions would be something between the advent of code - where the problems are hard because the spec is so bad on purpose - and project Euler - where the spec is so exact you don't really need a computer to solve the problems with enough thinking.

Something like 'plot the histogram of collatz sequence lengths of the first 100,000 numbers'.


The AoC spec isn't bad though?

The text always clearly states how your code has to behave, albeit it doesn't spell out every edge case you might overlook. Real world specs on the other hand is often contradictory and impossible to fullfil.


I'd argue you can usually find problems on project euler that are a little more obscure than what you'd typically get on leetcode.


Agreed about learning a new language starting with PE.

After that, I like to invent a big gnarly scenario that I don't have to completely solve, but one that takes me well out of the range of typical cookie-cutter tutorials. I want to find all the sharp edges on a new language/library/framework.


Advent of Code is great for this.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: