Company: Lam Research_7aug
Difficulty: medium
Tug of War Problem Description A game of Tug of War is played between two sides, and one side wins by pulling the other side completely towards itself. A lot of players have lined up to play. Every player is given a weight index W[i] between 0 and 9 on the basis of their weight. Before the game starts, the organizers must make the total weight index equal on both sides, while letting the maximum number of people play. They do this by sending away some players from the two ends of the line (possibly none from either end). The players who remain stay in their original order and are split into two sides: the two sides have the same number of players, the left side is the first half of the remaining players and the right side is the second half, so the people on each side are consecutive in the line, and the sum of the weight indices on the left side equals the sum on the right side. Find the largest group of remaining players that satisfies these rules, and print how many players it has f