Your solution being too slow is not a kata issue.
Note that inputs in this kata can be very large numbers, like count_ones(189700847246574, 320377134968482). Your current solution cannot handle numbers this big. It is even written in the description.
count_ones(189700847246574, 320377134968482)
This comment is hidden because it contains spoiler information about the solution
A hundred lines... But performance seems to be just fine: my program counted the number of all ones from 1 to 999999999999999999 instantly.
It was a very interesting kata, I liked it. Solved the task using permutations with repetition.
Scala translation
Nice kata, great to practice with, well done.
Unless description was changed:
... between 'left' and 'right' (including both)
Heads up. Both left and right are included in the count. I wasted nearly an hour wondering why my result was off by a tiny amount
D translation
PHP Translation. Please review and approve.
approved
Approved
Loading collection data...
Your solution being too slow is not a kata issue.
Note that inputs in this kata can be very large numbers, like
count_ones(189700847246574, 320377134968482)
. Your current solution cannot handle numbers this big. It is even written in the description.This comment is hidden because it contains spoiler information about the solution
A hundred lines...
But performance seems to be just fine: my program counted the number of all ones from 1 to 999999999999999999 instantly.
It was a very interesting kata, I liked it.
Solved the task using permutations with repetition.
Scala translation
Nice kata, great to practice with, well done.
Unless description was changed:
Heads up. Both left and right are included in the count. I wasted nearly an hour wondering why my result was off by a tiny amount
This comment is hidden because it contains spoiler information about the solution
D translation
PHP Translation. Please review and approve.
approved
Approved
This comment is hidden because it contains spoiler information about the solution
approved
approved
Loading more items...