Need help to find sum of binomial coefficients

Revision en1, by sanket407, 2016-08-21 13:42:32

In TCS codevita-2016 round 2 there was a question in which we need to calculate sum of even binomial coefficients like ((nC0)+(nC2)+(nC4)+(nC6)+...+(nCk)) mod 10^9+7 where n and k can be upto 10^14 and k<=n

How do i solve it ?? ( im not sure about the time constraint , It might be greater than the normal 1s)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English sanket407 2016-08-21 13:42:32 359 Initial revision (published)