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.
Good point. This solutions does not correctly handle upper camel case.
The
test_solution_randomly
function strips the uppercase letter from the start of the sentence with:So I take it this problem is only intended for lower camel case.
The problem statement should probably be made to be more specific.
I see someone already reported the issue:
https://www.codewars.com/kata/5208f99aee097e6552000148/discuss/rust#6181ac3bac59440057e75f57
Doesn't this function fail to account for a string that may start with a capital letter?
Take the example "CamelCase", this function output " Camel Case" instead of the intended "Camel Case".
oh my days, I cannot believe I misread that. Thank you for bring it into light. I should've paid more attention. That makes the problem even easier to solve.
No, the description tells you to maximize the array elements' values, not their count.
This comment is hidden because it contains spoiler information about the solution
Oh I see. I get it now.
Thank you :-)
No, and it's been explained many times, read the posts below or the kata description, it's explained there too.
This comment is hidden because it contains spoiler information about the solution
I like the use of mem::swap on gcd() function. Good work!
I don't even understand why you'd need this kind of code. It's unreadable and invokes a lot of unnecessary concepts.
@Kerlin I too used the quadratic solution and for some reason, a test fails in the main test. All sample tests pass. It would be better if we could see those tests. Strange how it's now working.
Recursion is slower than running a loop. So I'll pass thank you.