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.
Actually for implementing BigInt class in C++, i have used an integer array (vector of ints in fact), and to implement multiply operation, I have overloaded the addition operation of BigInt as well. I can multiply a very very large number with a relatively very small number, as in the case of calculating 25! = 25 * 24!; i can multiply ,for example, 24! with 25 but not with say 1000000, i get timeout in such cases.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Modified
You are viewing a single comment's thread. Return to all comments →
Actually for implementing BigInt class in C++, i have used an integer array (vector of ints in fact), and to implement multiply operation, I have overloaded the addition operation of BigInt as well. I can multiply a very very large number with a relatively very small number, as in the case of calculating 25! = 25 * 24!; i can multiply ,for example, 24! with 25 but not with say 1000000, i get timeout in such cases.