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.
I met the same problem, I guess that there are something that you did't consider in your codes.
same I passed all test but failed when attempt.
it is strange.
foobar099 => foobar100
but why for foobarsomething become => foobar01000
Thanks for you answer.
I underdtand that expected result is different.
What I don't understand if why it should be 'foobar01000'
The task says "... If the string already ends with a number, the number should be incremented by 1. ..."
foobar01000 is not an increment foobar1000.
'foobar1000' is your result, 'foobar01000' is the expected result. To see the input you can print it yourself.
All tests pass, however after attempting to submit it says:
'foobar1000' should equal 'foobar01000'
Am I missing something? Why '01000' and not '1001' ?
Can you please explain why it is 1 ?
test.assert_equals(longest_palindrome("abcdefghba"), 1)
Do you want to say that middle character "e" is palindrom with length of 1?
If so, I don't get it. Makes no sense for me... Am I missing something?
You need to print the number of duplicating elements, not the number of their occurrences.
4^0 = 1