The hardest part is lock_pairs() — locking a pair if it doesn’t create a cycle.
: The problem requires that each pair appears only once, with the winner first. Cs50 Tideman Solution
Here is a Python solution to the CS50 Tideman problem: The hardest part is lock_pairs() — locking a