Ad
  • Custom User Avatar

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

  • Default User Avatar

    Here are the tests above being run: Time: 509ms Passed: 12 Failed: 0
    Here is what happens when I attempt: Passed: 3759 Failed: 1 Errors: 1

    How is it possible that I'm passing the sample tests, but failing the actual test case, and if there are suppose to be only 40 random cases how am I passing over 2000?

    I understand many people have passed the kata already, but unless I'm failing a test case I have not included, it makes no sense I can't pass the kata.

  • Custom User Avatar

    Google how to sum the numbers from 1 to 100

  • Custom User Avatar

    Hmmm. Any guidance to share? Tried another method, same result __

  • Default User Avatar

    There is no error in the 3rd test.

  • Default User Avatar

    I don't understand: there are only 40 random tests and not 1000+... Furthermore 2472 guys passed the JS kata so I am quite sure there are no errors. Except the first test you mention where do the others come from?

  • Custom User Avatar
  • Custom User Avatar

    You need a more efficient algorithm ;-)

  • Custom User Avatar

    [JavaScript] - The JS tests seem to go extremely high, web Repl's think it's in an infinite loop.. is this just failing because the servers stop executing? I've optimized a lot.

    Passed: 19 Failed: 1 Errors: 1
    Test Results:
    Test Passed: Value == 30
    Test Passed: Value == 9
    Test Passed: Value == 495
    Test Passed: Value == 0
    Test Passed: Value == 3025
    Test Passed: Value == 3025
    Test Passed: Value == 3025
    Test Passed: Value == -10
    Test Passed: Value == 0
    Test Passed: Value == 5
    Test Passed: Value == -5
    Test Passed: Value == 0
    Test Passed: Value == 65650
    Test Passed: Value == 66963
    Test Passed: Value == 6506500
    Test Passed: Value == 650065000
    Test Passed: Value == 65000650000
    Test Passed: Value == 6500006500000
    Test Passed: Value == 650000065000000
    Things begin to get really big, try console.log(max) - Expected: 65000000650000000, instead got: 65000000699999980

    I've tried both reduce and forEach variants.

  • Default User Avatar

    Python attempt fails on third test case. No issues on all other tests.

  • Default User Avatar

    Works perfectly now...thank you!

  • Custom User Avatar

    I have re-published the Python version with the arguments in the correct order. This should resolve your issue.

  • Default User Avatar

    Same issue occurs in the Python version in the random test. Expects a negative value when no negative values are in the test case. Code is successful with all other example cases.