Time complexity of the code

What is the time complexity of the given code?

vector<vector > v(100,vector (100,-1) );
int func(int n,int m)
{
if((n==0)||(m==0))
{
return 0;
}
else
{
if(dp[m][n]!=-1)
{
return dp[m][n];
}
else
{
return func(n-1,m-2)+func(n-2,m-1);
}

  }

}

Hey @govilayush
Complexity of topdown == Number of unique states = NM in this case at max
hence its O(N
M)

The answer is wrong Kartik. It is a quiz question and the complexity is given as O(2^N).

Oh okay so here we are not storing the answer in DP matrix
i.e why we are not actually doing memoisation
So thats why complexity is exponential