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.
Man, I need to start remebering that min and max exist.
What on Earth
Nice one.
...why...?
The description specifically states that the string will consist only of letters a-z. So in practive your solution would be best, but in the context of this kata, the OP's is fine.
I'd strongly suggest you fix your formatting. This is pretty difficult to read.
This should probably be a 7kyu, seeing as it's much easier than most other 6kyu.
(Ruby) This kata has one of the most misleading descriptions I've ever read. The examples do not match the test cases in the slightest. Please fix it.
...but why?
Thanks for the quick response. Quick question though: does this not defeat the entire purpose of the problem? What exactly does it want you to return? I.e. I don't understand why it wants you to return the array with the minimum deleted for all of the tests except for this one.
The mutations test is still a problem in Ruby. For that specific test, for some reason it doesn't seem to want me to remove anything from the array, even the minimum.
Proof:
Log
[73, 181] (original)
[181] (modified)
You've mutated input array - Expected: [73, 181], instead got: [181]
I'd argue there's really no need for explicit return in a one-line method, though.
This comment is hidden because it contains spoiler information about the solution
Possibly the craziest way to do it but I guess kudos for figuring it out.
Nice one, though I'm fairly certain you don't have to escape the hyphen in your regex.