Election Simulator

Implement an Java ElectionSimulator class that can compute the minimum number of popular votes needed to win the Electoral College given the turnout during an election year.

The following two methods need to be implemented.

1) ElectionSimulator(List states)
Constructs a new ElectionSimulator for the given list of states.

2) Set simulate()
Returns the set of states with the minimum number of popular votes needed to win the election.

Sample Solution