Hackerrank – The Love-Letter Mystery

Problem Statement
A description of the problem can be found on Hackerrank.

Solution
For an element at index i create sum of differences between an ordinal number of character at index length(s)-i-1 and an ordinal number of the character at index i.

I created solution in:

All solutions are also available on my GitHub.

Java

Ruby

JavaScript

Scala