The Codetikki web analysts have a list of (website, user) pairs representing users visiting websites. They need to find the top k pairs of websites with the greatest similarity, where similarity is the Jaccard index: the number of common users divided by the total number of users who visited either site.
Example 1:
Constraints:
1 <= number of pairs <= 10^4 1 <= k <= 100 1 <= number of websites <= 1000
Tags:
