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.
Why would be "toLocaleLowerCase" a good use, when the 26 is hardcoded? Other alphabets have different set and also different count of characters. This is still applicable only to english alphabet, so no need to be correct partially with the others.
I agree with Marcel completely. Math IS NOT coding. Yes you can use your advanced math knowledge for some kind of shortcuts or speeding up the algorithm, but they are separate skills. I know plenty great mathematicians who are terrible programmers. Probably it is the same vice-versa.
Also, in the text of the task it clearly says "recursive", so I accepted it as a practice in that depratment.
You would get an error "division by zero" if $v2 is equal to $v1.