Team Split
Harddynamic programmingsubset sum
Split all players into two teams (a team may be empty) so that the total ratings of the two teams are as close as possible. Every player must be on exactly one team.
Return the smallest possible difference between the two team totals. There are at most 40 players and every rating is between 0 and 3000.
Examples
Input: ratings = [1500,1200,1300,1400]
Output: 0
Input: ratings = [2000,900,800]
Output: 300