I’ve worked extensively with Wordpress; that’s precisely why I hate it so much. It needs to die.
The proper solution, 20 years from now, will not descend from this branch.
For example, look at the "best time to buy and sell stock" series on leetcode: https://leetcode.com/problems/best-time-to-buy-and-sell-stoc....
These are much more naturally done by filling out an array, right? I've never done them with a recursion; I can't say I've thought hard about it -- is there a natural recursive solution?
(I linked to iii above but for anyone who hasn't tried them they are a great intro to DP problems; start with the first one: https://leetcode.com/problems/best-time-to-buy-and-sell-stoc...)
It does't work all the time like that since caching increases the Space Complexity.
There are DP problems that can be solved without storing all possible values in an array.
They said “guns are made for killing people” which is absolutely a true statement, many guns are specifically made for killing people.
As a consequence guns can be used as a deterrence as well. Since their primary purpose is to cause great harm, people that value their lives and not commit stupid actions.