Ad
  • Custom User Avatar

    added

  • Custom User Avatar

    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.

  • Custom User Avatar

    Also, this is not an issue with the Kata itself, so it shouldn't be marked as an issue.

  • Custom User Avatar

    Hint: does the string variable that you check in the loop contain only lowercase letters? (Answer is "No")

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?

  • Custom User Avatar

    Aren't is not the same as Aren'T

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?

  • Custom User Avatar

    @tuxino: absolutely right. Good answer!

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    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...