← Uber Interview Insights

Uber·Backend Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

Uber backend interview centered on a classic OO design problem, parking lot, but with enough depth in the discussion that it didn't feel like a checkbox exercise. The concurrency angle caught me a bit off guard and I think that's where I lost some points.

Questions Asked (5)

Q1

Design and implement an object-oriented model for a parking lot system, including vehicles, spots, levels, tickets, and pricing.

System DesignData ModelingTechnical Trade-offs
Author's notes

Started with the class hierarchy and felt pretty good about it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (e.g., scale, vehicle types, pricing rules) to scope the design. Then model the core entities and their relationships, focusing on extensibility and separation of concerns. Finally, discuss trade-offs and potential bottlenecks, showing how your design would evolve for production.

Pro tip: Emphasize how your model supports Uber's real-world needs like dynamic pricing, reservations, and high concurrency, and mention that you'd use interfaces and dependency injection to keep components testable and replaceable.

1. Clarify requirements and scope

Ask questions to understand expected scale, vehicle types, spot types, pricing rules, and any special features like reservations or EV charging. This ensures your design addresses the actual problem.

2. Identify core entities and relationships

Define classes for ParkingLot, Level, ParkingSpot, Vehicle, Ticket, and PricingStrategy, and describe their associations (e.g., a lot has levels, each level has spots, a ticket links a vehicle to a spot).

3. Design interfaces and abstractions

Use interfaces for Vehicle and PricingStrategy to allow extensibility (e.g., different vehicle types, pricing models). Explain how dependency injection enables swapping implementations.

4. Implement key operations

Outline methods for parking a vehicle (finding an available spot, issuing a ticket), unparking (calculating fee, freeing spot), and handling payments. Discuss concurrency control for spot allocation.

5. Discuss trade-offs and scalability

Address trade-offs like in-memory vs. persistent storage, locking strategies, and how to scale horizontally. Mention potential bottlenecks and how to mitigate them (e.g., sharding by lot).

Key Points to Mention

  • Use of interfaces and abstract classes for extensibility (e.g., Vehicle, PricingStrategy)
  • Separation of concerns: parking spot allocation, ticket generation, and pricing as distinct responsibilities
  • Concurrency handling for spot reservation (e.g., optimistic locking, distributed locks)
  • Pricing strategy pattern to support dynamic pricing and promotions
  • Database schema design and indexing for efficient queries (e.g., finding available spots)
  • Scalability considerations: partitioning by geographic region, caching, and asynchronous processing

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you implement the search strategy for finding the next available spot efficiently?

Algorithms & Data StructuresSystem Design
Author's notes

Went with per-level queues keyed by spot type.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem scope—what 'spot' means (e.g., parking, driver waiting area, restaurant table) and the scale/constraints. Then propose a data structure and algorithm that efficiently finds the next available spot, such as a priority queue or interval tree, and discuss trade-offs for real-time updates and high concurrency.

Pro tip: Emphasize the importance of handling concurrent requests and stale data—mention optimistic locking or versioning to avoid race conditions when multiple drivers request the same spot simultaneously.

1. Clarify requirements and constraints

Ask about the definition of 'spot', expected scale (number of spots, queries per second), latency requirements, and whether spots are static or dynamic. This shows you think before coding.

2. Choose an appropriate data structure

Propose a data structure that supports efficient 'find next available' operations, such as a min-heap keyed by distance/availability, a balanced BST, or an interval tree for contiguous ranges. Explain why it fits the constraints.

3. Design the algorithm and complexity

Outline the algorithm for finding the next spot (e.g., pop from heap, query interval tree) and analyze time/space complexity. Discuss how updates (spot taken/released) are handled efficiently.

4. Address concurrency and consistency

Explain how to handle simultaneous requests: use locking, atomic operations, or a queue to serialize access. Mention trade-offs between strong consistency and availability.

5. Discuss scalability and real-world considerations

Talk about partitioning (e.g., by geographic region), caching, and fallback strategies. Mention monitoring and metrics to ensure the system performs well under load.

Key Points to Mention

  • Priority queue (min-heap) for efficient retrieval of nearest available spot
  • Interval tree or segment tree for contiguous spot allocation
  • Concurrency control: optimistic locking, versioning, or distributed locks
  • Time and space complexity analysis (e.g., O(log n) for heap operations)
  • Handling updates: lazy deletion or decrease-key in heap
  • Scalability: sharding by region, caching frequently accessed data

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Two vehicles arrive at the same level at the same time. How do you ensure they don't get assigned the same spot?

System DesignTechnical Trade-offs
Author's notes

This is where things got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scenario: two drivers request a spot at the same time, and the system must assign exactly one. Then explain how you'd use a distributed lock or atomic conditional update (e.g., compare-and-set on the spot's status) to serialize the assignment, and discuss trade-offs like lock contention, latency, and failure handling.

Pro tip: Mention that the database's unique constraint or conditional update is the ultimate source of truth, and that locks are an optimization—this shows you understand correctness under failure and avoid over-engineering.

1. Clarify the race condition

Restate the problem: two concurrent requests for the same spot, and the system must guarantee exactly one assignment. Mention that this is a classic concurrency control problem.

2. Choose an atomic mechanism

Propose using an atomic conditional update (e.g., UPDATE spots SET status='assigned' WHERE id=? AND status='available') or a distributed lock (e.g., Redis Redlock) to serialize access. Explain why atomicity is key.

3. Handle failure and idempotency

Discuss what happens if a node crashes after locking but before committing: use timeouts, lock expiration, and idempotent retries. Emphasize that the database constraint is the final guard.

4. Discuss trade-offs

Compare approaches: optimistic concurrency (retry on conflict) vs pessimistic locking (blocking). Mention latency, throughput, and complexity implications for a high-scale system like Uber.

5. Address scale and partitioning

Explain how to scale: partition by geographic region or spot ID to reduce contention, and consider using a queue or serialization per spot. Mention monitoring and alerting for lock contention.

Key Points to Mention

  • Atomic conditional update (compare-and-set) as the simplest correct solution
  • Distributed locking with Redis or ZooKeeper, including lock expiration and fencing tokens
  • Database unique constraint or transaction isolation as the ultimate correctness guarantee
  • Idempotency and retry logic to handle transient failures
  • Trade-offs between optimistic and pessimistic concurrency control
  • Partitioning/sharding by spot ID or region to reduce contention at scale

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you extend this system to support EV charging spots, reservations, and license-plate-based entry and exit?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

Felt more comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the existing system's architecture and constraints, then propose extensions in three layers: data model (spots, reservations, vehicles), APIs (booking, entry/exit), and integration with hardware (license plate recognition). Emphasize trade-offs like consistency vs. availability, idempotency, and real-time vs. batch processing.

Pro tip: Highlight idempotency and failure handling for entry/exit events—since license plate recognition can be unreliable, design for retries and manual overrides. Also, discuss how to handle reservations that overrun, showing you think about edge cases and operational realities.

1. Clarify requirements and existing system

Ask about current architecture, scale, and constraints (e.g., number of spots, concurrent users, existing services). Clarify functional requirements: spot types, reservation rules, entry/exit flow, and non-functional needs like latency and availability.

2. Design data model and storage

Propose entities: Spot, Reservation, Vehicle, EntryExitEvent. Discuss storage choices (SQL for transactional consistency, NoSQL for scale) and indexing for fast lookups by license plate or time slot.

3. Define APIs and integration points

Outline RESTful or gRPC APIs for creating/canceling reservations, checking availability, and processing entry/exit events. Discuss integration with license plate recognition (LPR) systems via webhooks or message queues, ensuring idempotency.

4. Address concurrency and consistency

Explain how to prevent double-booking (e.g., optimistic locking, distributed locks) and handle race conditions between reservations and walk-ins. Discuss consistency models for entry/exit events (e.g., exactly-once processing).

5. Discuss trade-offs and operational concerns

Cover trade-offs: strong vs. eventual consistency, real-time vs. batch processing of LPR events, and cost implications. Mention monitoring, alerting, and fallback mechanisms for LPR failures.

Key Points to Mention

  • Idempotency keys for entry/exit events to handle duplicate LPR reads
  • Optimistic locking or distributed locks to prevent double-booking
  • Use of message queues (e.g., Kafka) for asynchronous LPR event processing
  • Data model design with proper indexes for license plate and time-range queries
  • Handling reservation overstay and no-shows with grace periods and penalties
  • Integration with external LPR systems via webhooks with retry and dead-letter queues

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

Walk through the park and leave API design, including what a ticket looks like and how fees are calculated.

API & IntegrationsPricing & MonetizationSystem Design
Author's notes

Park returns a Ticket with spot reference, entry timestamp, and vehicle info.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope and key requirements of the walk through the park and leave API, such as user flow, payment handling, and fee rules. Then outline the API endpoints, ticket structure, and fee calculation logic in a structured way, covering both functional and non-functional aspects. Finally, discuss trade-offs and edge cases to demonstrate depth.

Pro tip: Emphasize idempotency and clear error handling in the API design, and explain how fee calculation can be made configurable to support promotions and dynamic pricing—this shows you think about real-world operational needs.

1. Clarify requirements and scope

Ask clarifying questions about user types, payment methods, fee rules, and integration points to ensure you address the right problem.

2. Design API endpoints and data model

Outline the RESTful endpoints for starting/ending a walk, purchasing a ticket, and retrieving fee details, and define the ticket schema with fields like ID, status, timestamps, and fee breakdown.

3. Define fee calculation logic

Explain how fees are computed based on factors like duration, distance, peak hours, and discounts, and describe how to store and apply pricing rules.

4. Address edge cases and error handling

Discuss scenarios like payment failures, duplicate requests, and invalid tickets, and how the API handles them with appropriate status codes and idempotency.

5. Discuss scalability and integration

Mention how the API integrates with payment gateways and other services, and considerations for scalability, such as caching and rate limiting.

Key Points to Mention

  • RESTful API design with clear resource naming and HTTP methods
  • Ticket data model including unique ID, user ID, status, timestamps, and fee breakdown
  • Fee calculation algorithm with configurable rules for base fare, time, distance, and discounts
  • Idempotency keys for payment and ticket creation to prevent duplicates
  • Error handling with appropriate HTTP status codes and error messages
  • Security considerations such as authentication, authorization, and data validation

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.