[Solved] How much RAM would a lookup table for converting positive 32 bit integers to null terminated strings take

[ad_1] Let S(n) be the string for number n. Consider S(429,496,730) through S(4,294,967,295). By partitioning this into subranges S(429,496,730) through S(999,999,999) and S(1,000,000,000) through S(4,294,967,295), we can see they require (999,999,999−429,496,730+1)•10 bytes and (4,294,967,295−1,000,000,000)•11 bytes (10 bytes for nine digits plus a null terminator, and similarly 11 bytes for 10 digits and a terminator.) This … Read more