3 ms·
No, because 10 is not a power of 2, so any digit in the source (base 10) can affect any digit in the result (base 2). Converting from e.g. base 16 to base 2 is
by blahedo 4y ago
No, because 10 is not a power of 2, so any digit in the source (base 10) can affect any digit in the result (base 2). Converting from e.g. base 16 to base 2 is linear, because 16 is a power of 2.
- krick 4y agoThis simply isn't true. Faster algorithm is even linked in comments to this particular issue: https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf (p.38)
- blahedo 4y agoMy mistake! I knew it couldn't be linear and got sloppy. (For those checking that link, see p38, section 1.7.2)