Important: your sorted pairs may look slightly different, depending on sorting method you applied, because tied pairs are actually not sorted, as per problem specification.
Locked matrix
0
1
1
0
0
1
0
0
0
Winner
Alice
Graph
Red edges *not* locked, because they would create circle. Graph is interactive…
Testing in cs50 IDE
Copy the below into a file data.txt (including the last line-break character!)
3
Alice
Bob
Charlie
Alice
Bob
Charlie
Alice
Bob
Charlie
and then run the following command
./tideman Alice Bob Charlie < data.txt
Brought to you by Josef Richter Created with React & TypeScript in Codesandbox.io