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.
My appoligies, this is a mistake I made in the Initial Solution.
The method signature should read:
(Note the underscore before
arr
)This is because the tests expect a function with an un-named argument but the Initial Solution names it
arr
. I've updated the Kata for future takers's but you'll have to either reset your code or update it yourself.This comment is hidden because it contains spoiler information about the solution
I can't believe i missed that. Well done !
Edit : Should have replace .components(separatedBy: CharacterSet.decimalDigits.inverted).compactMap{Int($0)}
by .components(separatedBy: " ").compactMap{Int($0)}
Oh ok, I got it now :)
Thanks for your time.
It's not the wrong place, it was the wrong label only ;)
Check what's printed in the second sample test.
Are those the right values?
Thanks for your quick answer.
Sorry about the wrong place to post, I'm new on the platform, I'll know for the next time :)
I checked what you advice me to do, but those vars contains what I'm expecting: an array of int from what's passed in parameters.
For problems with your code, use
Question
label, notIssue
, that's for problems with the kata itself. Print your varsgoodRacesCount
andevilRacesCount
you'll see the problem.This comment is hidden because it contains spoiler information about the solution