3 ms·
Just enumerate them all, if none is missing it's fairly easy to compress. (And 1b per number is really inefficient) ;-) main = traverse print [1..99999999]
by quchen 5y ago
Just enumerate them all, if none is missing it's fairly easy to compress. (And 1b per number is really inefficient) ;-)
main = traverse print [1..99999999]
- luckman212 5y agoWhat language is that?
- WJW 5y agoHaskell
- WJW 5y agoThe Kolmogorov complexity of the set of all phone numbers is pretty low. All phone numbers with a few missing is also pretty low. In fact, I now wonder if you can even compress the 3.8b phone number set to less than 1 bit per phone number. It should be pretty doable since a significant chunk of the number space is not valid.
- dillondoyle 5y agoBut not all numbers are valid? 911. Not all area codes exist.