5 ms·
The size of the strings for that range of numbers. So, e.g. all of the strings starting with "twenty" will have that length of string (here, 6) * 10, plus the "
by danielharan 15y ago
The size of the strings for that range of numbers. So, e.g. all of the strings starting with "twenty" will have that length of string (here, 6) * 10, plus the "one" in "twentyone", etc. The "one", "two", "three", etc have the same length whether they're preceded by "twenty" or "thirty".
Account for the repeated strings "hundred", "thousand" or "million" and what follows them and you'll get the magic numbers above.