This is mine so I can safely say that it sucks. I thought it was nice and clean but when I benchmarked it against the other approaches that people used it was more than 20 times slower than the fastest. Don't use Regex for this!
If the string begins with an upper case letter the solution adds an unnecessary leading space. It would be good if the Kata was more specific about what is required.
i agree
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This is mine so I can safely say that it sucks. I thought it was nice and clean but when I benchmarked it against the other approaches that people used it was more than 20 times slower than the fastest. Don't use Regex for this!
The correctness of this solution depends on whether you define that camel case must start with a lower case letter. From Wikipedia:
If the string begins with an upper case letter the solution adds an unnecessary leading space. It would be good if the Kata was more specific about what is required.