[hackerrank solution] Mini-Max Sum 작성일 2017-08-03 | In hackerrank | solution function main () { arr = readLine().split(' ') arr = arr.map(Number) arr.sort() var sum = arr.reduce(function (sum, num) { return sum + num }, 0) console.log((sum - arr[arr.length - 1]) + ' ' + (sum - arr[0])) }