Skip to main content

New answers tagged

0 votes

Plurality - Test does not pass for the case of Bob

Do not increase the highest, just reassign it as follows if (candidates[i].votes > highest) { highest = candidates[i].votes; }
Abhishek Gupta's user avatar
0 votes
Accepted

Output the overall ranking of votes

I realized I am outputting the correct code for this. ranks[] is then supposedly used in record_preference(ranks) so the overall ranking can be seen in preferences[][].
Mestica's user avatar
  • 101

Top 50 recent answers are included