Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Not an issue, you need to read the descriptions more carefully ;-)
Thanks, I misunderstood the directions.
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'
:Order is important. And sorting everything discards order.
It is not clear when zeroes should be left;
Test.assert_equals(increment_string("foobar99"), "foobar100")
Test.assert_equals(increment_string("foobar099"), "foobar100")
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'
This comment is hidden because it contains spoiler information about the solution