When starting your recursion, always look for a path leading from the loser of the current pair back to the winner of the current pair .
The strength of victory for a pair is defined as preferences[winner][loser] .
return;
If you have any questions or would like me to explain a specific part of the code in more detail, just ask!
void print_winner(void)
bool has_incoming = false; for (int j = 0; j < candidate_count; j++)
bool vote(int rank, char *name, int ranks[]) Cs50 Tideman Solution
Find all pairs of candidates where one beats another, and add them to the pairs array.
string name = get_string("Rank %i: ", j + 1); if (!vote(j, name, ranks)) When starting your recursion, always look for a