Hackerrank – Mini-Max Sum

Hackerrank – Problem Statement

A description of the problem can be found on Hackerrank.

Solution

If you order the given array ascending
– the min sum are first n-1 elements
– the max sum are last n-1 elements

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby

Leave a Reply

Your email address will not be published. Required fields are marked *