Hacker News new | past | comments | ask | show | jobs | submit login

Am I crazy or is “conversion to base 15” very much a numeric method/operation?

Like sure the API itself may have string input/output, but under the hood there’s no way it’s not doing integer divisions and modulos.






From what I understand there was no change of base within the solution code. Author just used the base conversion function to prepare some test inputs.

"The input array must contain a string representations of the numbers. The programmer can use whatever representation they see fit"

Allowing arbitrary string based representation of numbers also means that whole task becomes a bit silly. Why stop at base 15, when you could use what I call the "FizzBuzz" number system. In fizzbuzz number system the divisibility by 3 and 5 is encoded in first symbols of number. Something like 1="1", 3="F", 5="B", 10="B2", 30="FB2", 1000="B200". Digits represent rest of the number you get after dividing it by 3 and 5 if possible.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: