when I try my code manually it does everything correct, but when I run Check 50, it says following ":( print_winner identifies Alice as winner of election print_winner function did not print winner of election" void print_winner(void) { // Get the highest scores merge_sort(candidates, candidate_count); // Print votes int i = candidate_count - 1; do { printf("%s\n", candidates[i].name); i--; } while (candidates[i].votes == candidates[i + 1].votes); return; }
Where it says merge_sort is just a code for sorting being the highest number of the array the highest amount of votes. Thanks in advance for any help