I'm trying to understand this binomial coefficient recursion code in C.
int binomial(int n, int m){
if(m == n){
return 1;
}
else if (m == 0){
return 1;
}
else if (m>n){
return 0;
}
else{
return binomial(n-1,m-1) + binomial(n-1,m);
}
}
I understand everything besides the final line return binomial(n-1,m-1) + binomial(n-1,m);. If anyone is able to explain what is happening I'd appreciate it. I know that actually understanding what the code is doing helps in improving your coding ability so that's why I wanna know.