Solutions to sum of array