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.
Not a kata issue, your code is wrong. You could have noticed how many guys passed the Swift kata before posting an issue.
Be sure that there is no error in the tests. Print the input to see exactly which test you are failing. For your 2nd example read again the description.
Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
do you get timed out? in that case your algorithm isn't efficient enough, if you fail tests your algorithm is wrong somewhere, try to find out what exactly you did wrong in that case and fix that!