I have the following piece of code, which is not compiling. Any ideas to what is causing the problem? My compiler is showing error with the declaration of unordered_map itself. I couldn't understand it. It works fine with ordered map(the usual map).
//ll stands for long long
long long binomial_tpd(ll n,ll k,unordered_map<pair<ll,ll>,ll>mp)
{
//cout<<"*";
if(k==0||n==k)
return 1;
else if(mp.find(make_pair(n,k))!=mp.end())
{
return mp.find(make_pair(n,k))->second;
}
else
{
ll b = binomial_tpd(n-1,k-1,mp)+binomial_tpd(n-1,k,mp);
mp[make_pair(n,k)] = b;
return b;
}
}