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.
Yes. Error was due to my test for an empty array not working. Sorry for wasting your time, (I now need to find out why the test didn't work).
I don't know why myself and bhaviksheth were unable to view the results of the basic test or log the inputs.
This comment is hidden because it contains spoiler information about the solution
I'm getting the same result as bhaviksheth. (60 passed and one error).
I'm also unable to expand the basics tests (where the error is) and I receive the following message at the bottom of the output screen.
My code handles the empty array case.
Thanks for creating the Kata.
Minor error in Kata description (possibly).
Description says:
and then lists four types of input. I've just realised that I'm a pedant.
Sorry for the late reply and the overly terse initial comment.
From memory I think I spent some time working out how to solve the problem for fractional values of n and was annoyed (mostly with myself) when the tests only use integer values of n. I just ran the tests again and got the same behaviour.
I assumed that the description just needed a tweak to save people like me from ourselves, but maybe there is something wrong with the tests if you never intended n to be integral?
Some of the solutions use Math.log1p and Math.expm1, which is clever, but probably not what you intended.
I really enjoyed these problems so thanks for writing them.
Disable the maths library completely and make it clear that the values of nth in the tests will all be integers.
I did kick myself after reading through the question again. :-)
Because it is a real world problem and in the real world you would solve so that
n choose x >= m
it might be worth tweaking the description to help people like me who don't read the question properly.to something like:
This comment is hidden because it contains spoiler information about the solution
Really elegant
This comment is hidden because it contains spoiler information about the solution