Answer to Question #56254 in Java | JSP | JSF for Bryan

Question #56254
Give the algorithm to decide if a list of integers can be divided into two smaller lists of
equal sum. For example,
[10, 20 , 30 , 5 , 40 , 50 , 40 , 15]
can be fairly divided into
[10, 20, 30, 5, 40] and [50, 40, 15]
However,
[4, 4, 8, 10,14] cannot be divided.
1
Expert's answer
2015-11-10T09:22:24-0500
It is a subset sum problem.
See https://www.geeksforgeeks.org/dynamic-programming-subset-sum-problem/ and pseudocode https://en.wikipedia.org/wiki/Subset_sum_problem

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS