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.
added
The issue marker is for when there's an issue with the Kata itself. Not when you have an issue with figuring out a solution. And certainly not when you have trouble understanding some code you found on the net.
I would suggest that you try to write a solution yourself.
Also, this is not an issue with the Kata itself, so it shouldn't be marked as an issue.
Hint: does the string variable that you check in the loop contain only lowercase letters? (Answer is "No")
I see the number 4 and there are 3 solutions listed.
I also see that you ran into a testcase that would overflow. Apparently my (admittedly somewhat excessive) use of reducing all fractions - both inputs and any intermediates - gets around that issue without needing special code.
When only author solved it, you usually see 2, eventhough there is only 1 solution. I added a solution to Pascal. How many you see now?
Aren't is not the same as Aren'T
I just finished solving this in C# and I had no troubles with the existing test cases. But I think it is missing at least one test that should have been there.
[25, 25, 25, 100] should return "Yes" - My currently passing solution would not pass this case, but because such a test isn't in there, my code passes.
I just completed this Kata for Pascal. Before this it showed as having been completed for Pascal 2 times, and now (including mine) it says 3.
However, I can only see one other solution (by g964). Is this a bug just for this Kata or a general bug? Or maybe a solution is hidden somehow?
@tuxino: absolutely right. Good answer!
Oh, and the issue-marker is only supposed to be used, when there is something wrong with the kata.
The kata works fine for JavaScript - there's almost 300 people who managed to solve it, so the issue is with your solution, not the kata.
Factorials grow absurdly quickly. So much that normal integer variables can't contain them.
Luckily, in this case you don't actually need to calculate the factorial of any number. Try shuffling around the terms in the choose function.
This comment is hidden because it contains spoiler information about the solution
Hey, could you make me a poster with these seven colours?
Sure, here you go. (Hands back a blank sheet of paper.)
I know that it's mathematically correct to expect x=0 for any m=1, and that it's probably way too late to change the kata, but I think the expected result should have been x=n, which would have been a nice little special case that needed to be handled for some implementations.
A float probably isn't the best choice of variable type. And if you actually calculate factorial(n), you are likely to overflow a small-sized integer.
Hint: You don't have to actually calculate factorial(n). Try shuffling the formula around.
Loading more items...