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
Yeah, I'm asking why?
Because that's what people voted.
Why more Clever than Best Practices?
from description:
"The string has a length greater or equal to one and contains only letters from a to z."
I think that it is not an issue.
shouldn't there be another filter saying ch < 'a' since you don't want character less than 'a'? Checkout your solution for input string "aaabbbmmmA"
got the same as you. But as a oneliner.^^ Love functional programming
fixed
Collections have a filter method that takes in a lambda expression whose first argument is the current element being iterated over.
Im not able to get your code can you please share how you got the inner class "ch" ??
Test cases should probably use assertEquals instead expect, as they don't fail when incorrect value is returned.
That was a nice kata. Thanks!
Although you probably should block Number.parserInt() as well. I've managed to finish it, second time around, just using that function.
HTH.