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.
The emphasized part is saying that the final palindrome should never have a letter appearing more in it than in the original string.
So you can't do
aaabb
->aabbaa
, because that would turna
's, count from3
to4
. You could doaaabb
->abba
though, as2 <= 3
.I do agree that the description is quite lacking, but as this doesn't seem like a suggestion, I'm marking as resolved.
Review the definition of factor: https://www.britannica.com/science/factor-mathematics
You're thinking about prime factors, and that's another thing.
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 version of kata does not have inputs with adjacent
+
.This has been changed by Voile. Now the function expects
long long
and it's ok.This comment is hidden because it contains spoiler information about the solution
that's a cycle, it's out of the scope of the problem, afaik.
You can check whether that's the case