Algorithm · Google · Medium
Requirements You receive a collection of user-activity entries. Every entry includes: user_id: a numeric identifier for the user timestamp: a timestamp value such as 2024-08-14 09:30:00 activity: an event label such as login, view, purchase, or logout Build support for these two analytics operations: Produce a mapping that associates every activity category with the count of distinct users who triggered it. Determine the mean amount of time, in seconds, that each user spends…
Checking your access…