Break the Code
Majority
Write a list for which this function gives the wrong answer.1def majority(values):
2 candidate = values[0]
3 votes = 0
4 for v in values:
5 if votes == 0:
6 candidate = v
7 if v == candidate:
8 votes += 1
9 else:
10 votes -= 1
11 return candidate