I’m new to dynamic programming. In many cases, I’ve seen that, a recursive solution is applied. For eg.:
solve(){
dp[i][j] = solve() * some_condition;
}
But, in some cases, we simply apply a 2D loop over all the DP matrix.
I’m not able to understand, when we apply a recursive solution, and when we apply a 2D loop.
I think I am missing something in the concept.
Please help.