Hackerrank - Two Arrays

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

Solution
Sort two arrays. array1 ascending, array2 descending. Add each ith element in both array and compare if their sum is greater or equals than required amount.

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby