โ† Amazon questions

Arrange people in a queue based on game results

Filed under Amazon

Given the results of games between n people (where every pair has played and there are no draws), arrange them in a queue a[0], a[1], ..., a[n-1] such that for all i > 0, a[i] won against a[i-1].

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.