3 ms·
There's zero difference. It teaches you how to solve problems analytically. In the real world you have to solve problems analytically too, even if you have a te
by hackermailman 5y ago
There's zero difference. It teaches you how to solve problems analytically. In the real world you have to solve problems analytically too, even if you have a terrible corporate job writing some template for a bank you're going to run into something that needs solving eventually.
Here is the truth about leetcode, advent of code, codeforces, whatever similar problem site:
There is no memorization involved, just like you don't memorize every math problem on earth to map directly to a correct answer you instead derive the answer using the skills you have in math from experience solving problems before. Polya has a book for this, called 'How to Solve It' he just happens to have used math to teach problem solving but it's the exact same concept.
You have at your disposal problem solving strategies such as: complete search, dynamic programming, greedy and divide and conquer. You don't need to memorize any code to write a greedy search, you could ad-hoc hack that together just know what a greedy strategy is. You don't memorize all search algorithms throughout history ever invented.
There is no grind. People who haven't done it assume you sit there for hours daily writing brute force algorithms, no. Instead it's exactly like doing a crossword puzzle over a coffee and something you can do at your leisure where in a month or so you're now at leetcode medium/hard no problem.
In my limited experience, the difference between these problem solving sites and a job interview is after your hacky ad-hoc greedy search solution they will ask you to optimize it 'can we make this faster' so really for an interview you only need knowledge of the language you are using and it's built-in data structures what their complexity is. That doesn't require much memorization either just know how they are implemented looking at the standard library or documentation where hopefully somebody has explained the implementation 'this dynamic array has constant time access, but linear replication when full'. Only that level of knowledge, like knowing how to move something out of a loop so it's not repeatedly initializing or rewriting your solution in another data structure no insanely advanced algorithm analysis needed just practice using the language standard library or container libraries enough and this will be easy. People make this harder than it really is, tl;dr learn problem solving techniques either from logic philosophy texts, math or programming problems, learn the standard library of the language you want to use, that's it.