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.
Can it do " A,"?
Does this solution produce side effects?
I know the input string is rather short, but I think it can be easily done with less iteration with the use of dict or Counter. This would probably reduce algorithm complexity.
I've also used Counter in my solution, but in slightly different way. I iterate over the first counter's items instead of the possible digits.
Yes, I understand. It could be probably written explicitly in the kata description, which strategy you should choose to pass tests.
This comment is hidden because it contains spoiler information about the solution
Funny solution! My monitor is too narrow to read this :D Will it work for 12-31? Who knows what else might be missing? :D
I'd use other name, e.g. 'outlier', where You used name 'odd', for clarity, to differentiate outlier-odd number from normal odd numbers.
I don't know if it is the best practice, but I did it in a similar fashion. It seems pretty straightforward.
strawbeRy for strawbeRRy is 1 change (add 'r') or is it 2 changes (replace 'y' with 'r', add 'y')?
How about
strawbeRRRy for strawbeRRy? 1 change (remove 'r') or 2 changes (remove 'y', replace 'r' with 'y')?
Is there any advantage of using *(res+i) instead of res[i] ?