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.
OP solved it, closing
Not an issue
You might wish to re-read the tests, as I think the starting number is actually
59884848459853
.Or is there any problem in a specific language?
Maybe the description means 'berr', instead of 'beer', is different to 'barrel' in 3 letters (adding 'e', 'l' and changing 'e' to 'a')?
The number of shift is determined by the position of the key in the input alphabet. I first thought it's determined by its distance to ascii 'a'. Then I thought it's determined by the unicode distance to the first character in the alphabet. I think it should be put in the description.
Also there's no spec in the description describing what we should do if the key is not in ascii.
It depends on how you treat replacement. If you count it as one operation, 'barrel' is different to 'beer' in 3 moves. (1 replacement and 2 removals)
However my interpretation could be wrong. I haven't complited this Kata yet. I'm still getting a failure on 7th test.
It might be helpful to print the input after decoding, and also printing the output before encoding to make visual inspection easier.
Well, if you look below you will probably see it has been discussed; while I agree on your point, I have to admit it is also true that in terms of sheer coding complexity this one is not overwhelming.
Btw, I cannot change it on my own, but someone else might read and act on his own :)