Hackerrank - Solve me first & second

This is a summary post of first Hackerrank intruductory challenges - Solve me first, Solve me second. It is only required to select your favourite programming language. You get a template and just submit this code.

Both solutions:

Also available on my GitHub here and here.

Solve me first

Scala

Java

Javascript

Ruby

Solve me second

Scala

Java

Javascript

Ruby