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.
I'm making a C++ version
all basic tests pass, but random tests throw an error.
I substitute the values for random tests into my IDE - everything matches
but for some reason the website gives an error
For example:
Testing for 'WHER5EAEAQ/eSBU.R*bnZR60HOlIG!Xf07C8=bz0OCT2LROYBVXjdx9W4RjKrHzEDadtwHYbcPTbF'
expected 47
actual 49
I substitute it into my IDE - answer 47
Crystal: reference solution and author's solution are golfed beyond any reason and should be cleaned up.
FORMAL REQUEST FOR BETTER EXPLANATION OF CHALLENGE
Can the author of this challenge please look to:
(a)
Provide a far better explanation of this challenge than is currently being given
(b)
Provide a clear definition and/or clarification of what an 'alphanumeric' character is
and
(c)
Review the accuracy of all of the tests that have been built into this challenge
SCRUTINISATION OF EXAMPLE TEST
For the test "$aaabbbccddd_!jJpqlQx_.///yYabababhii_"
If the 'alphanumeric' characters are "abcdefghijklmnopqrstuvwxyz0123456789" (i.e - the lower case letters 'a-z' and numbers '0-9')
then
The original text of "$aaabbbccddd_!jJpqlQx_.///yYabababhii_" gets reduced to "aaabbbccdddjjpqlqxyyabababhii"
If the answer is 25 then there are five possible excerpts that could constitute the answer to the test
Possibility A - Indices 0-24 - aaabbbccdddjjpqlqxyyababa
Possibility B - Indices 1-25 - aabbbccdddjjpqlqxyyababab
Possibility C - Indices 2-26 - abbbccdddjjpqlqxyyabababh
Possibility D - Indices 3-27 - bbbccdddjjpqlqxyyabababhi
Possibility E - Indicies 4-28 - bbccdddjjpqlqxyyabababhii
For it to be possible for there to be a palindrome, there can be no more than one instance of a letter which appears an odd number of times
Using only the letters 'a-h' I can demonstrate that none of the above five possibilites can be correct, and hence that the answer to the test of "$aaabbbccddd_!jJpqlQx_.///yYabababhii_" cannot be 25
Possibility A - Indices 0-24 - aaabbbccdddjjpqlqxyyababa
a = 6 times (even)
b = 5 times (odd)
c = 2 times (even)
d = 3 times (odd)
Possibility B - Indices 1-25 - aabbbccdddjjpqlqxyyababab
a = 5 times (odd)
b = 6 times (even)
c = 2 times (even)
d = 3 times (odd)
Possibility C - Indices 2-26 - abbbccdddjjpqlqxyyabababh
a = 4 times (even)
b = 6 times (even)
c = 2 times (even)
d = 3 times (odd)
h = 1 time (odd)
Possibility D - Indices 3-27 - bbbccdddjjpqlqxyyabababhi
a = 3 times (odd)
b = 6 times (odd)
c = 2 times (even)
d = 3 times (odd)
h = 1 time (odd)
Possibility E - Indicies 4-28 - bbccdddjjpqlqxyyabababhii
a = 3 times (odd)
b = 5 times (odd)
c = 2 times (even)
d = 3 times (odd)
h = 1 time (odd)
On the above detailed and logical reasoning, the answer to the test "$aaabbbccddd_!jJpqlQx_.///yYabababhii_" cannot be 25 (twenty five)
This comment is hidden because it contains spoiler information about the solution
Ruby 3.0 should be enabled.
My code is not correct but it did pass all the tests.
The simplest test case to add: 'ab_ba'. The idea is that all carecters that are not used in the palindrome are special characters.
"..palindrome that could be made by combining the characters in any order BUT USING EACH CHARACTER ONLY ONCE". From my understanding, we can use each character how many ever times it occurs in the string and not just once.
This comment is hidden because it contains spoiler information about the solution