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.
if the string contains 2 spaces this code will return 1
function wordCount(str) { return (str.split(" ")).length; }
I think that the tests are not strict enough, I think my answer is not supposed to pass, since it is not symmetrical
Anyway, great Kata ! I'm still trying to find a better answer !
Awesome! The custom matcher is working well.
Done! The test cases now rely on a custom
assertSimilarUnsorted
matcher :)Glad you like it :)
Good call fir the order, however I'm stuck because there is no Test matcher that would do the job, I will try to add another prototype method to Test.
I like this kata so far. My only question is whether the order of the solution array should matter. I'm getting the following error message:
Test Failed: Expected: [["tsar","star","tars"],["rat","tar"],["cheese"]], instead got: [["rat","tar"],["tsar","star","tars"],["cheese"]]
The groupings seem to be correct, but should I be penalized for having them in a different order?
You sugguest more test cases in the Kata description ?
Or in the solution test cases ?
Maybe provide more test cases.
Is tagging already done ?
This comment is hidden because it contains spoiler information about the solution