Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I agree, but this is not an issue, rather a suggestion. Anyway, changing it would invalidate 60+ solutions, so it stays as is.
Good catch! Fixed.
Thanks!
Interesting: anybody cares to give me more details?
@GiacomoSorbi - one for you
I felt the same the first time I solved a problem requiring to compute the LCM of a list of numbers; well, it still means that you are learning, so is not so bad in the end ;)
Any further suggestion will be welcome!
Thanks for your observation. Now it's says as you pointed out
decomposition of a number
. Fixed! Thanks also for your solutions in Python. One of them upvoted. (+1)Modifications done. Lots of thanks for your posts!
I know that this kata is a bit problematic...
The description already says:
The function expand will return an array of the form [numerator, denominator]; we stop the loop when numerator has a number of digits >= the required number of digits.
and
the way is to use Taylor expansion of the exponential function...
Are you sure that the
digit
th series expansion gives at least "digit" digits?How to change the test cases so that they expect the numerator is exactly "digit" digits long? In some cases the Taylor expansion gives "digits + 1".
Maybe I could say:
"The function expand will return an array of the form [numerator, denominator]; we stop the Taylor expansion when numerator has a number of digits >= the required number of digits". What do you think of that sentence?
Usually in
exp(x)
x is a real so an int or a float. Nevertheless I will add in the description an example where x is a float.Hi finsternacht. Thanks for your feedback. The tests were prepared for efficient brute force algorithms. You gave a good idea in the possibility of further challenges related with probability. If you publish one, I'll be there to try to solve it. I haven´t seen your solution yet. :)
Oh, I see, thanks.