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.
With Rust it's the same as in needing to return either a String or None, but it works fine for this kata.
I have no idea about what you're talking about (I don't do much Swift), but whatever, the fact is that, with a very few exceptions, all the published solutions do it, that's what the reference solution does, I did it too, and it works.
if i change the return type to String? I will have to make force unwrapping to get non-optional answer, but the answer can be nil. Force unwrapping of nil is a error. I mean not "nil. I mean nil
You need to change the return type to
String?
. I think it's a mistake from the translator that should be fixed (?).This does not work on Swift because you need to return either nil or String, but both options cannot be made in Swift. Either String or "nil"