3 ms·
> what's important is that there are a relatively small number of distinct subproblems. This is the crucial part IMO. Whether the larger algorithm is recursive
by vishnugupta 3y ago
> what's important is that there are a relatively small number of distinct subproblems.
This is the crucial part IMO. Whether the larger algorithm is recursive or iterative etc is secondary. But yes DP usually tends to show up in recursive algorithms most often.