Find the unordered product pair bought together most often.
Unlock detailed company stats for this questionUpgrade
Given order strings of product IDs bought together, e.g. ["B03 B06 B08", "B06 B08", "B12 B06"], generate all unique unordered pairs per order (an order with exactly 2 items counts as that pair; more items produce all size-2 combinations). Count pair frequencies and return the most frequent pair, breaking ties by the lexicographically smallest pair. The constraints were small (50).
Community answers
No answers contributed by the community yet.
Related questions
Given a CSV string of ordered products, find the top K most sold products.Find the most frequently co-purchased pair of products.Related courses

Course

Course
Course
