First Customer Who Visited Exactly Once

Asked at Uber · Coding Questions · Difficulty: Medium · Last asked Jun 15, 2026

A website receives a stream of customer visits. Design a data structure that records visits and, at any moment, reports the earliest customer who has visited exactly once so far. Reporting must not rescan the history.

Loading the problem…