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.
why that?
I am very very sorry but I had a typo in the code of one function in the tests... I fixed that and your code goes right now! Could you try again and tell me if it is right. Thanks for your help.
Only a piece of advice: try not to use an array to calculate fib (there are lots of ways without arrays). It's not useful and I am afraid you have an overflow somewhere when you fill it and then sum it. Not enough time to go further, sorry!
The tests never return "NaN" so I don't understand how you got "Expected Nan".
I just tried a few solutions and saw no problems.
You could simply print the input. Good luck and thanks for your post.
The tests are of the same nature in all languages and 1616 guys passed the kata.
It would be more interesting if you gave examples of "strange results".
Consider
isMerge('abac', 'ac', 'ab')
. It should be easy to see that it should returntrue
. However, your code returnsfalse
. Figuring out why and solving it is what makes this kata 5 kyu instead of 6 or 7.Let me know if you need more hints. :-)
Good luck!