The ith element of votes is the
number of people who were originally planning to vote for candidate
i. Return the minimum number of votes that you must change
to ensure that candidate 0 (your favorite) will have more votes than any
other candidate.
votes will contain between 1 and 50 elements,
inclusive.
votes will be between
1 and 100, inclusive.
{5, 7, 7}
Returns: 2
Buying one vote from each of the other two candidates leaves candidate 0
with 7 votes and the others with 6 each.
{10, 10, 10, 10}
Returns: 1
You need strictly more votes than all other candidates, so you need to
buy one vote.
{1}
Returns: 0
If you are the only candidate, you automatically win.
{5, 10, 7, 3, 8}
Returns: 4