Ad
  • Custom User Avatar

    Thank you, fixed

  • Custom User Avatar

    Have fixed test cases

  • Custom User Avatar

    Python random test cases have bugs, that VIOLATE kata description

    The strings will not be the same length, but they may be empty (length0).
    

    e.g.:
    'U5y', 'QAt';
    'lRuCSFUkYf', 'b4Lzkjz9sE';
    etc.

  • Custom User Avatar

    I believe, there is a slight bug in Python random test cases, e.g.:

    I get

    Testing for F0x3d
    It should work for random inputs too: None should equal 3901
    

    but the right hex representation of 3901 is 0xf3d (case insensitive) and F0x3d is an invalid hex number;

    More example:

    Testing for a0x43
    It should work for random inputs too: None should equal 2627
    

    the right hex representation of 2627 - 0xa43, a0x43 is an invalid hex number;

    Testing for B0x5967
    It should work for random inputs too: None should equal 743783
    

    the right hex representation of 743783 - 0xb5967, B0x5967 is an invalid hex number.

    P.S. I had to run solution about 20 times before getting another buggy test case.

  • Custom User Avatar

    Agree
    Thank you for your remarks and suggestions
    Fixed?

  • Custom User Avatar

    Agree
    Fixed

  • Custom User Avatar

    Sorry for the delayed reply.
    I had a bug in my code - confused class field with instance field.
    Issue resolved.

  • Default User Avatar

    Got it, sorry for misunderstanding

  • Default User Avatar

    I believe, for some n there are more than one solution!
    I.e.:

    n = 65
    11, 10, 9, 8, 7, 6, 5, 4, 3, 2
    15, 14, 13, 12, 11
    33, 32 (in test case)
    
    n = 18
    6, 5, 4, 3
    7, 6, 5 (in test case)
    
    and there are more
    
  • Custom User Avatar

    There is definitely a bug in Python translation in random tests.
    Example logs:

    Testing for h.
     Log
    Words in dictionary: [code, co, ab, at, vkwgu, ldx, cod, hrb, wd, codewars, hh, ejfi, ear, a, ate, qxd, dqyg, j, ko, hqhr, r, tpczl, w, iyz]
    Pattern: 'h.' 
    It should work for random inputs too: True should equal False
    

    'h.' should match hh

    Testing for ....
     Log
    Words in dictionary: [lkvu, code, co, vp, at, yke, orkrl, po, alda, codewars, wr, ear, fm, a, c, ate, rr, oi, fxjvu, h, cod, v, y, kxxh]
    Pattern: '....'
    It should work for random inputs too: True should equal False
    

    '....' should match lkvu, code, alda, kxxh

  • Default User Avatar

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

  • Default User Avatar

    Adding DISTINCT keywork solves the constraint to use IN without actually using it)

  • Default User Avatar

    Definitely true, but in case of few number of iterations, like in the cata above, you won't notice a difference in time

  • Custom User Avatar

    It should be mentioned in the description that spaces in the begining/end of test cases are VALID or change the test cases to return 0

  • Default User Avatar

    Correct wrong type of parameter - should be long
    In other way the compiler produces errors because of type overflowing

  • Loading more items...