problems
problems copied to clipboard
Adds extra check for Plurality
This extra check ensures that only the winner's name is printed, even if the losers tied, thus preventing some hack around logic, such as can be seen on my first check50 submission of the problem as an example.
Unless I see the "hack-around" code and it changes my mind, I see minimal value in this PR.
Though for complete thoroughness, it is not a bad quick change to make. Still, a whole new case is unnecessary. Simply just change one of the loser's amount of votes in a print_winner function to match the other loser. For example, I would just change line 84 in testing.c to candidates[2].votes = 1