Ad
  • Custom User Avatar

    Python: All unnecessary comments should be removed from the full test suite.

  • Custom User Avatar

    Random tests is indeed faulty: it often assigns a value onto an already overloaded function, and expects the value to overwrite the entire overloaded function.

    The kata has never specify cases such as

    obj.foo = func1
    obj.foo = func2
    
    obj.foo = 'abc' # ???
    obj.foo # should equal 'abc'
    

    so we should not be expected to handle this (as we wouldn't know how to handle this anyway, it's unspecified, not tested in the fixed tests, and arguably out of scope of the kata).

  • Custom User Avatar

    Hi,

    Just a suggestion but the tests may need to include cases other than "foo". Seem like I was able to hardcode it and still pass all the tests.

  • Default User Avatar

    Is there a difficult version? :D

  • Custom User Avatar

    C++ fork that handles this and this issues.

    • Tests are now truly random.
    • The comparasion now happens with delta.
    • Added missing headers.

    Please, review and reject/accept.

  • Custom User Avatar

    Return Average Completion Time, Average Turn Around Time, Average Waiting Time and Throughput in vector (A-CT, A-TAT, A-WT, Throughput) all rounded to two decimal places.

    While solving in C++ I (and, I believe, a lot of other solvers) had a problem with rounded to two decimal places part. It practically turns the kata into the guessing game. A problem is that the way you do that may change the result, and since this kata uses Assert::That(..., Equals(...)) for comparing doubles it actually creates a huge obstacle. E.g.

    const double n = 689;
    const int size = 5;
    
    const double r1 = std::round(n / size * 100) / 100; // -> 137.8
    const double r2 = std::ceil(n / size * 100) / 100; // -> 137.81 (btw before this issue is resolved, this is the way you're supposed to do that) 
    const double r3 = std::ceil(n  * 100 / size) / 100; // -> 137.8
    

    Something should probably done with this, because it makes such a good kata practically unsolvable if you're unlucky enough.

  • Custom User Avatar

    In C++ random tests are not random at all. Please, check this out -> https://docs.codewars.com/languages/cpp/authoring#random-utilities

  • Default User Avatar

    I found the description ambiguous to understand.

    sequence advances with adding next natural number seq[natural number] times so now, 3 appears 2 times and so on

    What does adding next natural number times to seq[natural number mean] ?

  • Custom User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    Need suggestions, feedback and testing.

  • Default User Avatar

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