We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The formula in the link that used is Cn+1 = (2*(2n+1)*Cn)/(n+2)
and n can be stored in 32 bit integer. Then, why is it necessary to calculate modInverse or generateInverse while we can directly use (n+2) ?????
Please explain me...
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lucy and Flowers
You are viewing a single comment's thread. Return to all comments →
The formula in the link that used is Cn+1 = (2*(2n+1)*Cn)/(n+2) and n can be stored in 32 bit integer. Then, why is it necessary to calculate modInverse or generateInverse while we can directly use (n+2) ????? Please explain me...