vector<vector > dp(100,vector (100,-1) );
int func(int n,int m)
{ lli x;
if((n==0)||(m==0))
{
return 0;
}
else
{
if(dp[m][n]!=-1)
{
return dp[m][n];
}
else
{
dp[n][m]= func(n-1,m-2)+func(n-2,m-1);
return dp[n][m];
}
}
}
Please explain the Recursion tree and dp array.