If you prefer using base 10 for the Int() class (its much easier to convert these to
Fantastic news! We've Found the answer you've been seeking!
Question:
If you prefer using base 10 for the Int() class (its much easier to convert these to and from strings, for example), you may consider using base 1 billion. A number in this base can be written as
an 1000000000n + an1 1000000000n1 + . . . + a1 10000000001 + a0 10000000000
where each ai is an integer between 0 and 999999999. The array (or list) of ints which hold the digits can store a number in this range. The size of this data structure will clearly be much smaller. Conversion between base 1 billion and base 10 is easy because 1 billion = 109 . You may also consider using an array (or list) of type long, using as your base the maximum power of 10 which does not exceed the maximum positive long value 263 1.
Posted Date: