Top-K Co-Occurring Products in Sessions (Recommendation by Frequency)
Given a target product id targetId and a list of user browsing sessions sessions, where each session is a list of product IDs viewed in that session.
Count, across only the sessions that **contai...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
