Ad
  • Default User Avatar
    The constructor function for Animal should accept 4 arguments in total in the following order: name, age, legs, species, status.
    

    The description is incorrect: there are 5 arguments, not 4.

  • Default User Avatar

    Kotlin test cases:

    1. The use of random.nextInt() means that sometimes 0 is tested, which violates the note "humanYears >= 1".
    2. The random number generator is invoked once only, because it is placed outside the for-loop, so the same random number is always tested.
  • Default User Avatar

    Fixed.

  • Default User Avatar

    Confusing to me without advanced chemistry background...
    Maybe because the image is missing? (see the issue I opened)

  • Default User Avatar
  • Default User Avatar

    V is one of the python sample tests but should it be shown as an exception in the instructions?

  • Default User Avatar

    The conditions are actually quite confusing. Turning your character or using a potion are all irrelevant. The condition, based on my understanding, is that you are on an adjacent cell to the enemy (vertically or horizontally), INCLUDING the turn where you are moving away from the enemy, BUT EXCLUDING the turn where you have just moved into the cell.

    Please correct me if I am wrong.

  • Default User Avatar

    No big advantages I think. You may change to "elif" if you think that is clearer. I use consecutive "if"s just because I think that is neater.

  • Default User Avatar

    In the python sample tests, "countSubsequences" should be amended to "count_subsequences".

  • Default User Avatar

    The example in the kata description is wrong:

        cluster(3, [(1, 1), (3, 5), (4, 4), (8, 2), (0, 1)])
        should return
    
           [(3, 5), (4, 4)],
           [(8, 2)]
         ]
    

    Not 3 clusters, not all points are clustered.

  • Default User Avatar

    This kata is ranked 4 kyu, but the other Connect-4 kata with more requirements is ranked only 5 kyu...
    https://www.codewars.com/kata/connect-4/

  • Default User Avatar

    One way is to come up with an algorithm which takes linear time and goes through the list once only.

  • Default User Avatar

    This probably requires a change in the method of validation by directly verifying the solver's solution instead of comparing it against a predetermined solution.

  • Default User Avatar

    Similar but more complicated case:

    ('0', '15', [['ci', '5', '10'], ['aj', '2', '6'], ['vb', '7', '8'], ['aq', '1', '5'], ['ik', '8', '9'], ['io', '3', '4'], ['et', '0', '5'], ['eq', '2', '5'], ['zq', '4', '6'], ['ep', '3', '8'], ['re', '11', '15'], ['pa', '2', '3'], ['rb', '3', '4'], ['ti', '11', '14'], ['nt', '12', '15'], ['yh', '10', '12'], ['ye', '7', '9'], ['hw', '14', '15'], ['hl', '8', '9'], ['ud', '2', '6'], ['hb', '2', '3'], ['kc', '4', '9'], ['oi', '1', '3'], ['pn', '5', '8'], ['um', '8', '12'], ['kp', '0', '3'], ['mq', '1', '4'], ['oy', '6', '9'], ['kz', '2', '5']])
    
    ['kp', 'ep', 'um', 'nt'] should equal ['et', 'ci', 'yh', 'nt']
    

    Note:
    ['kp', 'ep', 'um', 'nt'] is 0 -> 3 -> 8 -> 12 -> 15.
    ['et', 'ci', 'yh', 'nt'] is 0 -> 5 -> 10 -> 12 -> 15.

  • Default User Avatar

    Python - final test cases - Issue of equally valid paths but only one is deemed correct. Example:

    ('0', '15', [['gu', '7', '11'], ['zk', '9', '10'], ['cb', '9', '11'], ['vl', '7', '11'], ['vm', '8', '13'], ['zc', '0', '1'], ['et', '2', '7'], ['le', '11', '13'], ['fn', '10', '13'], ['rc', '1', '4'], ['lz', '8', '11'], ['lx', '0', '3'], ['be', '8', '12'], ['dj', '3', '5'], ['ba', '0', '1'], ['do', '6', '11'], ['xg', '9', '10'], ['jn', '8', '12'], ['jh', '6', '8'], ['ys', '9', '12'], ['wy', '6', '11'], ['qu', '5', '9'], ['kd', '6', '9'], ['ml', '6', '10'], ['qv', '8', '13'], ['ul', '10', '15'], ['qi', '1', '6'], ['or', '4', '5'], ['sd', '12', '13']])
    
    ['ba', 'qi', 'ml', 'ul'] should equal ['zc', 'qi', 'ml', 'ul']
    

    Note: Both 'ba' and 'zc' turn '0' to '1' in this test case.

  • Loading more items...