Question: Please the algorithm must be with complexity little o(n^2) Question 1 (15 points; 10 points; 5 points) Let S be a set of n positive
Please the algorithm must be with complexity little o(n^2)

Question 1 (15 points; 10 points; 5 points) Let S be a set of n positive integers, where n is even. a) Give an efficient o(n2) algorithm to partition S into two subsets S1 and S2 of 2n elements each with the property that the difference between the sum of the elements in S1 and the sum of the elements in S2 is maximum. b) Analyze the time complexity of your algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
