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.
Condition to count could be made better for performance. Performance is going to be better simply by comparing every char in input string against a set of vowels.
This comment is hidden because it contains spoiler information about the solution
Simple and also readable compared to other solutions.
This comment is hidden because it contains spoiler information about the solution
Why is this 7kyu? Should be 8kyu.
Nice explanation for identity.
added a broken initial solution
I'm getting the same message. One assert is expecting my function to return an empty string if all categories are 0, but another one is expecting the regular "(B : 0) - ..."
(This is in C++)
If this is intended, then I am smol brain...
Update: Okay, I read the last line in your instructions...
I am afraid there is nothing to fix. I tried some solutions, they worked fine and 90 people passed the Scala translation.
Anyway you should give the inputs.
Scala testcases have contradicting testcases due to which submissions are failing.
Test Failed
Expected "[]", but got "[(B : 0) - (R : 0) - (D : 0) - (X : 0)]"
Test Failed
Expected "[(A : 0) - (W : 0) - (D : 0) - (C : 0) - (X : 0)]", but got "[]"
This should be fixed.
This should be a 7kyu IMO.
This comment is hidden because it contains spoiler information about the solution
From learning point of view, I learnt about comparison op with string but from readability point of view, the solution left me ambigous about why explicit conversion to Integer is not implememted.
scala.collection.immutable.StringOps
, conversions inscala.Predef
.Was not aware filter can be applied on String in Scala because getClass() only returns java.lang.String. There is filter() method in java.lang.String class. What is the class to look for the documentaion scala string (if there is something like that)?
val s = "hello"
println(s.getClass())
Loading more items...