Back to problems

Track Customer Website Visits

Algorithm · Uber · Medium

Website Visit Tracker Medium · Topics · Company Tags · Hints Design a class WebsiteTracker that processes a stream of customer visits to a site. The class must implement two methods: visit(int customerId): Invoked each time the customer with identifier customerId lands on the website. firstUnique(): Returns the customerId of the first unique visitor (the one whose earliest appearance is the smallest among all customers that have visited exactly once so far). If there is no…

Checking your access…