Given N teams and a black-box function displayResult(T1, T2) indicating the winner between any two teams, order the teams such that team i lost to team i+1 for all adjacent pairs.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.