Search
⌘K

Leetcode 3554. Find Category Recommendation Pairs

Given purchase and product tables, compute all unordered category pairs (category1 < category2) and count the number of unique users who bought from both categories, reporting only pairs with at least 3 distinct users. Be sure to deduplicate multiple purchases per user per category before forming category pairs and order results by customer_count desc, then category1 and category2 asc.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.