Ad
  • Custom User Avatar

    Why fork the best solution only to change it to the ugliest brute force?

  • Custom User Avatar

    Write an algorithm that can handle n where 1000000 ≤ n ≤ 1500000.

    (…) it must correctly handle negative numbers as input.

    The SSOT rule should be respected by specifications too.

  • Custom User Avatar

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

  • Custom User Avatar

    Python2: Clear (or randomize more) your tests. I had 29 123.456.789.0 test cases on Submit, and it is just an example of non-uniqueness.

  • Custom User Avatar

    Python3: I get ✘ Value is not what was expected for the third test case Test.expect(determinant(m2) == -20), but for the input [ [2,5,3], [1,-2,-1], [1, 3, 4]] [freaky non-consistent spaces, btw] my function returns -20 with errors of the order 1e-14. You should use some epsilon comparison.

  • Custom User Avatar

    Python3: The class bool is a subclass of the class int, so the type checking forced by this kata is a silly carping.

  • Custom User Avatar

    Python2: You do not allow imports from __future__ due to some primitive code embedding.

    Test Results:
    File "<string>", line 13
    SyntaxError: from __future__ imports must occur at the beginning of the file
    
  • Custom User Avatar

    Python3: Check your use of Test.assert_equals

    ✘  Yep! Seems alright: False should equal True
    
  • Custom User Avatar

    Random tests are not compatible with Python3:

    Time: 118ms Passed: 4 Failed: 0
    Test Results:
      Number climber
      Reach a number by doubling the step size at each step.
    ✔  Test Passed
    ✔  Test Passed
    ✔  Test Passed
    ✔  Test Passed
      Random Tests
    STDERR:
    Traceback:
       in 
    NameError: name 'xrange' is not defined
    
  • Custom User Avatar

    Python3: Tests passed, running Submit…

    Time: 130ms Passed: 1 Failed: 0
    Test Results:
    ✔  Test Passed
    STDERR:
    Traceback:
       in 
       in random_token
    NameError: name 'xrange' is not defined
    
  • Custom User Avatar

    The specification is broken:

    • No mention of a case of path not existing.
    • Especially mentions 0x0-grid case and does not mention how to respond to this case.

    The path must begin with the start node and end with the end node.

    Hmm, so maybe the client wants [None] as the answer to the 0x0 case, since we are given the input where start_node is end_node is None? No?

  • Custom User Avatar

    You should know that Python 3 has the print function.

    Test Results:  
    File "<string>", line 19  
        print "function has been disabled for this Kata"  
                                                       ^  
    SyntaxError: Missing parentheses in call to 'print'