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.
First rate coding exercise
Tests are buggy and they fail when you mutate the input string. Your solution would work if you would not mutate the
str
.Tests need to be fixed so they dont fail in an obscure way when a user solution mutates the input.
I'm using ruby and when I click on attempt, the 100 random tests can never be fulfilled.
First, it will return an error saying it was expecting an empty array on a random string.
The exercise shows that when a string isn't empty, it should split it normally and return an array with the characters.
If you instead make that so only the example strings pass and every other random string returns an empty array (as it seemed that the attempt required), it shows a completely different scenario, where it expects the code to run normally.
So you can never have the 100 random attempts to work.