Earlier quoted context omitted.
The only reason it seems to even learn them is to pass an interview... What a utterly stupid and broken process. All it's testing is recall, that you've memorized some algorithms that 99% of developers will never need. Especially when these are really hard problems that people have studied for years, to think that anyone who hasn't memorised the solution is working this stuff out in an hour on a whiteboard is crazine…
"these are really hard problems that people have studied for years" Because of this. So that when you encounter a problem, you know how it can be solved efficiently. If you disregard existing knowledge, you are likely to spend a lot of time cooking up something complex and half-assed that creates an unnecessary maintenance load. Like music is composed of fundamentals, similarly most problems in computing can be decom…
Unless you are stuck on an Island coding during a vacation, not one person on earth faces this kind of a situation.
Almost anybody doing anything apart from basic beginner level coding work knows to look up to a solution on the internet if a solution is not scaling already.