codingforeveryone/js

New-member-22 Largest pair sum in array

Closed this issue · 1 comments

I did not come up with this problem, but it was one of the first ones I solved on CodeWars.

Given an array of numbers, find the largest pair sum in the array.

For example

[10,14,2,23,19] should return 42 (i.e. sum of 23,19)

[99,2,2,23,19] should return 122 (i.e. sum of 99,23)

Here you can find the original: http://www.codewars.com/kata/556196a6091a7e7f58000018

I'll have a go at this one I think...