Binomial Coefficients
{
vector< vector<int> >table(N,vector<int>(k));
for (int j = 0; j < N; j++)
table[j][0] = 1;
for (int i = 0; i < N; i++)
{
for (int j = 0; j < k; j++)
{
table[i][j] = table[i-1][j-1] + table[i-1][j];
}
}
return table[N][k];
}
This code is supposed to return the binomial coefficient of N and k but is not working properly. Anybody know what is wrong with the code?

