Object-Oriented Programming · Amazon · Medium
Problem You are building a feature for an e-commerce platform that needs to identify users who have signed in only once. Each time a user signs in, the platform records a unique username. Your task is to maintain these sign-in events and efficiently return the username of the oldest one-time visitor — the user who signed in exactly once and appears earliest among all such users. Implement the UserTracker class: UserTracker() initializes the tracker. void userLogin(String…
Checking your access…