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.
Thanks a lot!
Thanks a lot!
Enabled Swift 5.
Enabled Swift 5 by removing
.characters
.Invalidating the solution shouldn't be a reason not to update. We won't keep old language versions forever so kata needs to be updated at some point anyways.
For Swift kata that still uses Swift 4, see https://github.com/Codewars/codewars.com/wiki/List-of-Swift-Kata-to-Update
Sorry I have no time for that now but it is planned by CW. You can use Swift 4.0 (Swift is changing things too often and rather brutally...-) . Moreover I am afraid that updating to Swift 5. invalidates some solutions.
Swift version has available deprecated API only, using modern documentation it's almost impossible to be sure what API is unusable and what is valid. Please update to Swift 5. Thank you
Very old and deprecated Swift API, unable to complete kata with modern Swift documentation. Updating kata to Swift 5 would be very great.
@kazk: thanks!
It wasn't crashing with Swift 4, but I removed the deprecated
.characters
and enabled Swift 5.The problem is with big numbers(was in my case, probably in yours as well). Try to run your solution with 9223372036854775807. In my case I used Int variable and it just ran outside of available values, changing it to UInt helped, though it's just a quick fix.
I don't know why the compiler doesn't show this error on Codewars, in Xcode it is shown properly.
Not the kata fault since 295 guys passed the Swift kata. Maybe the Swift CW runner has been modified.
You can report that at: https://github.com/Codewars/codewars.com/issues.
When submitting wrong solution in Swift, inner implementation of checks uses deprecated API, which crashes.