Hackerrank – B’day Gift

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

Solution
Sum all elements. The result is sum / 2.

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby