Cs50 Tideman Solution ~repack~
if (is_source)
string name = get_string("Rank %i: ", j + 1); if (!vote(j, name, ranks)) Cs50 Tideman Solution
Let’s implement lock_pairs and its helper creates_cycle . if (is_source) string name = get_string("Rank %i: ",
The most complex part of the solution is lock_pairs . The goal is to create a directed graph (the locked adjacency matrix) without creating a "cycle" (a loop where j + 1)