Question: Array Challenge Have the function Arraychal lenge (arr) take the array of integers stored in ax which will always contain an even amount of integers,

 Array Challenge Have the function Arraychal lenge (arr) take the array

Array Challenge Have the function Arraychal lenge (arr) take the array of integers stored in ax which will always contain an even amount of integers, and determine how they can be split into two even sets of integers each so that both sets add up to the same number. If this is impossible return - 1. If it's possible to split the array into two sets, then return a string representation of the first set followed by the second set with each integer separated by a comma and both sets sorted in ascending order. The set that goes first is the set with the smallest first integer. For example: if arx is [16,22,35,8,20,1,21, 11], then your program should output 1,11,20,35,8,16,21,22

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!