Ten songs on shuffle: how many pairs are out of order?
An album has 10 songs in a fixed intended order. You put the 10 songs on shuffle, giving a completely random play order. A pair of songs is "out of order" if the shuffle plays them in the opposite order to the album.
On average, how many out-of-order pairs does the shuffle produce?
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
Sign in to join the discussion · reading is open to everyone
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.
Related questions
How many rising steps in a shuffled list?How many falling steps in a shuffled list?Coats handed back at random: how many match?Secret Santa draws: how many pick themselves?Quizzes returned at random: how many honor students?
All questions →