Re:A guide to learning algorithms through LeetCode
by extra_rice on Sunday August 16, 2020 @08:59PM
(#24182768)
DP as a paradigm is very interesting. From a high level view, one can appreciate the essential concepts that make it work, with things like memoization, optimal substructure, etc. It's also interesting how it relates to shortest paths problems, and greedy algorithms.
However, as you said, actually trying to solve DP problems relies on knowing the trick, and the tricks varies almost wildly from problem to problem. They're unintuitive, and difficult to derive normally. The intuition you gain from one of them could be entirely useless, or, worse, counterintuitive for another. I personally think, they shouldn't be used for interviews because being able to solve them seems to be more a matter of luck than actual competence.
For the same reason though, I think they make for terrible interview questions - very much dependent on knowing a specific "trick" that doesn't actually come up often in day to day coding.