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.
This comment is hidden because it contains spoiler information about the solution
I am not seeing of examination ( (lenString == 0) || (k > lenString) || (k <= 0) ) ?
In "Attempt" there are more basic tests than in "Tests".
Thank you for answer. I read "Troubleshooting Your Solution" "When I run "Test", everything passes, but when I hit “Attempt” tests fail".
As far as I understand "Attemp" consist of 2 parts: 1- handle basic cases (such as in "Test") 2-handle random cases.
Why in "Test" all basic test passed, but in "Attemp" basic test failed?
Test are only the first tests, generally basic and easier ones. Attempt is the full battery of tests, with much more tests, random inputs, edge cases..., it is much more exhaustive. So there is nothing strange with what you are getting : your code handles basic tests but fails on the complete ones :)
when i push Test
Time: 2042msPassed: 1Failed: 0
Test Results:
Test Example
should handle basic cases
Test Passed
Completed in 0.0796ms
You have passed all of the tests! :)
but when i push Attemp
Time: 2088msPassed: 1Failed: 1Exit Code: 1
Test Results:
Test Example
should handle basic cases
Test Failed
Log
Expected
: 3
to equal
: 1
Completed in 0.6610ms
should handle random cases
Test Passed
Completed in 0.0234ms
why basic test failed on Attemp, but not failed on Test?