Question: PROBLEM 2 A33 0; WEI? We want to pla}r roughly zir game in cs5800. You are given an array that holds the weights of 11

PROBLEM 2 A33 0; WEI? We want to pla}r roughly
PROBLEM 2 A33 0; WEI? We want to pla}r roughly zir game in cs5800. You are given an array that holds the weights of 11 people in the class W = (1501, mg, . . . , to"). Your goal is to divide in people into two teams such that the total weight of the two teams is as close as possible to equal. Describe such an algorithm and give its running time. The total number of people on each team should differ by at most 1. Assume that M is the maximum weight of a person, i.e., Vi, mi :1 M. The running time should be O{n3M}. The output of the algorithm should be the list of people on each team and the difference in weight between the teams. Ir

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 Accounting Questions!