I think this question needs some correction :
1. Recurrence relation is not matching with the function in the algorithm
2.Some base conditions are missing as n>=m.
Due to these mistakes, this question is a little bit ambiguous.
Correct algorithm:
int binomialCoeff(int n, int k)
{
// Base Cases
if (k > n)
return 0;
if (k == 0 || k == n)
return 1;
// Recurence
return binomialCoeff(n-1, k - 1) + binomialCoeff(n - 1, k);
}
Let Z(n,m) denotes number of function call required then,
Z(n,m) = Z(n-1,m) + Z(n-1,m-1) +2
If you want visualize it it will form a binary tree of maximum height= O(n)
So.rougly number of function calls will be O(2^n).
This algorithm can be modified by using dynamic programming which reduces it’s time complexity.