3 ms·
Does leetcode really do much in terms of algorithms though? In my experience, a lot of problems can be solved with sheer brute force, or by merely using the lan
by lhorie 6y ago
Does leetcode really do much in terms of algorithms though? In my experience, a lot of problems can be solved with sheer brute force, or by merely using the language built-in data structures and memoization tricks.
I think algorithms per se don't necessarily give you much of an advantage. For example, LIS[0] is fairly frequently-run algorithm if you work with web stuff, but nearly no one in that specialization knows how to write it from memory (and knowing about it doesn't translate to being able to write other algorithms)
Where I think leetcode helps is in giving you an opportunity to practice the skill of putting together various building blocks in a semi-realistic fashion (e.g. having to use a memoization trick to get under the run time threshold is something that is similar to real life performance work, despite the exercise itself being completely unrealistic).
[0] https://en.wikipedia.org/wiki/Longest_increasing_subsequence https://en.wikipedia.org/wiki/Longest_increasing_subsequence