PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Uber

Design Historical Visit Tracker

Last updated: Apr 22, 2026

Quick Overview

This question evaluates design of in-memory data structures and event-processing APIs, focusing on efficient state maintenance for historical timestamped events, query semantics for cumulative counts, handling out-of-order arrivals, and scalability and time/space trade-offs.

  • hard
  • Uber
  • Software Engineering Fundamentals
  • Software Engineer

Design Historical Visit Tracker

Company: Uber

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

Design an in-memory component that stores visit events of the form `(visitor_name, timestamp)` and supports historical queries. Requirements: - `record_visit(name, ts)`: add one visit event. - `get_single_visit_visitors(ts)`: return all visitor names whose number of visits with timestamp less than or equal to `ts` is exactly 1. - Timestamps are integers and queries are inclusive. - Multiple visits by the same visitor may exist. - Discuss how your design changes if events arrive out of order, if queries are frequent, and if the data volume becomes large. Explain the API, data structures, time complexity, and major trade-offs.

Quick Answer: This question evaluates design of in-memory data structures and event-processing APIs, focusing on efficient state maintenance for historical timestamped events, query semantics for cumulative counts, handling out-of-order arrivals, and scalability and time/space trade-offs.

Related Interview Questions

  • Build a React Parking Lot Manager - Uber (medium)
  • Design a Real-Time Top-K Ranking System - Uber (hard)
  • Design a Parking Lot - Uber (medium)
  • Design a Parking Garage Object Model - Uber (medium)
  • Design follow/follower classes - Uber (medium)
Uber logo
Uber
Jan 26, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
6
0
Loading...

Design an in-memory component that stores visit events of the form (visitor_name, timestamp) and supports historical queries.

Requirements:

  • record_visit(name, ts) : add one visit event.
  • get_single_visit_visitors(ts) : return all visitor names whose number of visits with timestamp less than or equal to ts is exactly 1.
  • Timestamps are integers and queries are inclusive.
  • Multiple visits by the same visitor may exist.
  • Discuss how your design changes if events arrive out of order, if queries are frequent, and if the data volume becomes large.

Explain the API, data structures, time complexity, and major trade-offs.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Uber•More Software Engineer•Uber Software Engineer•Uber Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.