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.
Array object does not have an attribute of
lp_idx
You shoud try -7
No. It's the order the first letters are in the list/array you are given, not in alphabetical order.
I made the same mistake! :)
The trick isn't to actually calculate the factorial
This comment is hidden because it contains spoiler information about the solution
You're right. Because prime factoraztion is the only way i know to find the prime factors of a number. I would love to learn a better approach in this kata. Thanks!
Are you computing 22! then prime factoring? If so, that's probably a bad idea. If not, I dunno what's causing the lag.
The reference solution checks for equality, so I'm pretty sure the tests are sound.
The thing is, most shifts other than the correct shift will not produce words. Therefore if your solution can get most of the words, it will succeed. To me, this is normal behavior.
When I was checking if all the shifted values were in WORDS, I wasn't able to pass all the tests.
However, when I was only checking if most of the words were in WORDS, then I could pass all the tests.
I guess there is something wrong either with some of the random tests or with the WORDS set.
Oh shit, nevermind. i was so dump
i dont understand something.
test case "DAM" shifted 7 is "KHT" and "kht" isn't in the set WORDS
So how is 7 the correct answer?
my solution got timed out when input is greater than 22!. Really have no clue how to fix it. :/
if only someone can state clearly how should i order the string...
here are the results for two of the text input.
'(A : 0) - (B : 114) - (C : 70) - (W : 0)'
'(B : 364) - (R : 225) - (D : 60) - (X : 0)'
isn't the second shold be '(B : 364) - (D : 60) - (R : 225) - (X : 0)'?