to trace the path from the current loser back to the winner.
We check can_reach(loser, winner) = can_reach(Alice, Charlie)? Yes → cycle detected. Correct!
The winner is the candidate who ends up at the “source” of the locked graph (no incoming edges).
#define MAX_CANDIDATES 9 #define MAX_VOTERS 9 #define MAX_NAME_LENGTH 50
