kb

Krishna Bharadwaj

Geek, programmer, foss enthusiast, loves Python,
Ex-Microsoft Student Partner, Ex-National Instruments.
You can Subscribe to my blog, Follow me on twitter. More about me here.


I follow discussions on the Algorithms community on orkut. Came across one question which asked us to implement very big integers in C/C++. We can calculate 12! using integer data type, 20! using long long. Java provides a data type BigInteger which can handle it, Python can handle REALLY LARGE VALUES. In C/C++ we can implement this with the help of an integer array where each digit is represented as an element of the array. I have used a class for this purpose.

Here's my implementation of a large number in C++..


blog comments powered by Disqus