First, we look at every possible pair of candidates. For each pair (e.g., Alice vs. Bob), we count how many voters prefer Alice over Bob, and how many prefer Bob over Alice.
This is the most critical and complex step. The algorithm builds a directed graph by drawing "arrows" from winners to losers in the sorted order. tideman algorithm
For every ordered pair ( (a, b) ), count how many voters prefer ( a ) to ( b ). First, we look at every possible pair of candidates
Pairs are sorted by the (the margin by which the winner beat the loser). Alice vs. Bob)
Interpretation: A > B by 3 voters, B > A by 2 → A beats B.