Ad
  • Custom User Avatar

    Not an issue, you need to read the descriptions more carefully ;-)

  • Default User Avatar

    Thanks, I misunderstood the directions.

  • Custom User Avatar

    Well, take isMerge('codewars', 'cwdr', 'oeas'). If you try to arrange the three strings as in the description, you'll see that it doesn't work for 'cwdr':

    s      = c o d e w a r s
    part1  = c   d   w    r    <-- becomes "cdwr" instead of "cwdr"
    part2  =   o   e   a   s
    
    

    Order is important. And sorting everything discards order.

  • Default User Avatar

    It is not clear when zeroes should be left;

    Test.assert_equals(increment_string("foobar99"), "foobar100")
    Test.assert_equals(increment_string("foobar099"), "foobar100")

  • Default User Avatar

    javascript
    The test cases are still mixed on whether or not the function is supposed to preserve leading zeros:
    Test Results:
    Log
    foobar000
    Test Passed: Value == 'foobar001'
    Log
    foo
    Test Passed: Value == 'foo1'
    Log
    foobar001
    Test Passed: Value == 'foobar002'
    Log
    foobar99
    Test Passed: Value == 'foobar100'
    Log
    foobar099
    Expected: 'foobar100', instead got: 'foobar0100'
    Test Passed: Value == '1'

  • Default User Avatar

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