Checking every pair takes 83 minutes.
transcript
Two listeners rank the same songs. You count the pairs in opposite order. How long does that take?
These are the friend's ranks, in your order. Three comes before one. Three is larger. That pair is out of order. The list has seven such pairs.
Six songs need fifteen checks. Seven pairs are out of order.
A thousand songs need nearly half a million. A hundred thousand need nearly five billion. The count grows with n squared.
Each check takes one microsecond. Five billion checks take eighty three minutes. And that is one pair of listeners.
Each pair is a separate check. Double the list, and you get four times the checks. Even an almost sorted list costs the same.
Merge sort counts the pairs while it sorts. It needs about one and a half million comparisons. That takes about one and a half seconds.
Sorting and counting are one job. Full breakdown in the lecture.