Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Thanks mate

  • Custom User Avatar

    Please don't post working solutions in discourse, it spoils the kata and if you do it anyway, please always "Mark as having spoiler content".

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I pass all tests but 1 in Scala due to decimals:

    Testing: 7.000000000000001E-5
    Actual: [14286, 3.1415226550]
    Expect: [14286, 3.141522655]
    

    any quick fixes one can recommend?

  • Custom User Avatar

    Your problem lies in i <- Range(0,n+1,5), linear solution will be too slow.

    My Scala solution runs ~6.5s, so Scala version seems to be OK.

  • Custom User Avatar

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

  • Custom User Avatar

    Hilariously, using memoization and recursively summing factorial(n-1) n times as strings (from summing big numbers as strings kata) doesn't result in time out, it just about does it. I was so surprised that I am here demanding testing solutions more for even bigger values haha

  • Custom User Avatar

    I did notice a bit unusual display of test cases, but I did not see it's that confusing. It's probably of no help for you anymore, but I rased appropriate issue above.

  • Custom User Avatar

    In Scala, test cases have multiline names, and this causes confusing behavior. Part of the name (first line) is used as header of collapsible test case section, and remaining lines appear in a way similar to stdout log output. This can (and does, see post below) cause confusion and problems with correct interpretation of log messages.

  • Custom User Avatar

    Hey

    I found the error, just the test output was a bit misleading. The multiline test name was rendered a bit weirdly and the copy of the test input was missing first row, which lead to me testing with ilformed matrix which caused the test to work locally, but invalidating the input for different reason. The real reason was wrongly formed sub matrices.

    Also the log of the test included stuff from the following test.

  • Custom User Avatar

    Facing the same issue at this point, I am using recursion and I am passing every case up until 120 or so and then it times out. Did you manage to pass the kata?

  • Custom User Avatar

    I just solved the kata in Scala and encountered no problems. I am going to close the issue here as not a kata bug.
    If you want us to take a look at your solution, post it here (remember about markdown code formatting and spoiler flag) so we could take a look at it.

    Interleaved tests output can be a sign that test runner executes tests in parallel, but AFAIK there were some countermeasures taken against such behavior. I will verify if it's indeed the case. This can also cause some problems if your solution has some state, but you said it does not.

  • Custom User Avatar

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

  • Loading more items...