Question: Complete in JAVA please Given a list of values, Determine if it is possible (true) or not (false) to divide the values into 2 sets
Complete in JAVA please
Given a list of values,
Determine if it is possible (true) or not (false) to divide the values into 2 sets such that the values added up are all equal.
Make a program in Java to complete this
Example:
input:
8 // this is the number of values
5 // the following are values
5
5
5
25
5
5
5
This will return TRUE, as set one will have (25,5) and set two will have (5,5,5,5,5,5). The value added up inside both equal 30.
More examples:
The first line will always be how many numbers there are. For example 2, 10 numbers in total. Example 3, 4 numbers.


Example 2 input: 10 7 7 7 14 14 14 21 21 28 output: F Example 3 input: 4 1 2 3 4 output: T Example 4 input: 5 1 1 1 1 1 output: F
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
