Oct 21, 2020
Great explanation! The tricky part is finding the subproblem.
I have a followup article breaking down common types of dynamic programming problems
https://medium.com/@algo.monster.hello/types-of-dynamic-programming-questions-84e0621c7a28