title: To find combination value of large numbers
body: <p>I want to find (n choose r) for large integers, and I also have to find out the mod of that number.</p>
  
  <pre><code>long long int choose(int a,int b)
  {
      if (b &gt; a)
          return (-1);
      if(b==0 || a==1 || b==a)
          return(1);
      else
      {
          long long int r = ((choose(a-1,b))%10000007+(choose(a-1,b-  1))%10000007)%10000007;
          return r;
      }
  }
  </code></pre>
  
  <p>I am using this piece of code, but I am getting TLE. If there is some other method to do that please tell me.</p>