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.
Fixed. See @Bouchert below's comment. Your answer will still be wrong after the fix.
.
Fixed.
I have the same issue.
Thanks Souzooka.
That test got me at first too. Look closely at the input and it should become clear why it's expecting false.
Which language?
No, it is correct.
I think the solution here is not to modify the input array as Souzooka has explained. As you can see, the current completions are
Py = 25, JS = 54, C# = 5
and they each have the same solution set up. Can we close the issue?OK, so I took a look at this.
My reference solution does return
25
for this input. What is likely happening (and is still a valid issue in itself) is that you are modifying the function input list and in some way, and this means that the kata is susceptible to input modification.I've created a new fork which passes in a copy of the generated test case. JavaScript also seems to be susceptible and needs to be fixed as well.
In the mean time, make sure that you're not modifying the input array (e.g. calling any void functions on the list like
Add
orRemove
orInsert
, or setting any indexes) and your solution should work.You can also put
input = new List<char> (input)
at the top of your method to copy the list yourself.