← Uber Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

Uber onsite OOD round for SWE, classic parking lot design question. The round is light on algorithms but heavy on class structure, and the interviewer will absolutely push you mid-round with the bus follow-up if you don't preempt it.

Questions Asked (4)

Q1

Design a multi-level parking lot system that supports multiple vehicle types (motorcycle, car, bus) and multiple slot sizes. Implement park, unpark, and slot availability query operations.

System DesignData ModelingTechnical Trade-offs
Author's notes

This is the kind of question where you think you're done after sketching the classes and then they hit you with 'what about buses?' I hadn't pre-baked the consecutive-slot scan and it showed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a class hierarchy for vehicles and parking slots with appropriate sizing rules. Focus on core operations (park, unpark, availability) and discuss data structures and concurrency for a multi-level lot.

Pro tip: Emphasize extensibility and real-world constraints like concurrency and pricing, showing you think beyond basic CRUD. Mention how your design would handle peak loads and dynamic pricing, which is crucial for Uber-scale systems.

1. Clarify Requirements and Scope

Ask about number of levels, slots per level, vehicle types, and expected throughput. Clarify if slots can accommodate larger vehicles and if there are special slots (e.g., EV charging).

2. Define Core Entities and Relationships

Identify main classes: ParkingLot, Level, ParkingSlot, Vehicle (with subclasses Motorcycle, Car, Bus). Define slot sizes (e.g., Small, Medium, Large) and mapping of vehicle types to compatible slot sizes.

3. Design Data Structures for Operations

Choose data structures to efficiently find available slots (e.g., per level, per size: min-heap or queue of free slots). For park, assign a suitable slot; for unpark, free the slot and update availability.

4. Address Concurrency and Scalability

Discuss locking mechanisms (e.g., per level or per slot) to handle concurrent park/unpark. Consider distributed design if multiple instances, and how to maintain consistency.

5. Discuss Trade-offs and Extensions

Talk about trade-offs: simplicity vs. efficiency, memory vs. speed. Suggest extensions like reservation, dynamic pricing, and integration with payment systems.

Key Points to Mention

  • Vehicle-to-slot size compatibility (e.g., motorcycle can fit in small, medium, or large; bus only in large).
  • Efficient availability query: maintain counts per size per level, or use bitmaps for quick checks.
  • Concurrency control: use locks or atomic operations to prevent double-booking.
  • Scalability: sharding by level or using a distributed cache for availability.
  • Extensibility: design patterns like Strategy for pricing, Factory for vehicle creation.
  • Real-world constraints: entry/exit gates, payment integration, and dynamic pricing based on demand.

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

Q2

How would you handle the slot compatibility logic so that motorcycles can park in either motorcycle or regular slots, while cars are restricted to regular slots only?

System DesignTechnical Trade-offs
Author's notes

I started with a big if-else chain and the interviewer gave me a look.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a flexible design using an enum for vehicle types and slot types with a compatibility matrix or strategy pattern. Discuss trade-offs between simplicity and extensibility, and outline how to enforce compatibility at allocation time.

Pro tip: Mention that you would encapsulate compatibility logic in a single place (e.g., a method or class) to avoid scattering conditionals, and consider future vehicle types like bicycles or electric cars to show forward-thinking.

1. Clarify Requirements

Ask about the types of vehicles and slots, expected scale, and whether compatibility rules might change or expand. Confirm that motorcycles can use both motorcycle and regular slots, while cars can only use regular slots.

2. Define Data Model

Represent vehicle types and slot types as enums or classes. Create a compatibility mapping (e.g., a matrix or a method) that determines if a vehicle can park in a given slot.

3. Design Allocation Logic

When a vehicle arrives, filter available slots by compatibility. For motorcycles, prefer motorcycle slots first to conserve regular slots for cars, but allow fallback to regular slots if needed.

4. Encapsulate and Extend

Encapsulate compatibility logic in a dedicated component (e.g., ParkingPolicy) to centralize rules. Use the strategy pattern or a simple map to allow easy addition of new vehicle or slot types.

5. Discuss Trade-offs

Compare simple conditional checks versus a more extensible design. Consider performance, maintainability, and how to handle edge cases like full motorcycle slots but available regular slots.

Key Points to Mention

  • Use enums for VehicleType and SlotType to avoid magic strings and improve type safety.
  • Implement a compatibility matrix or a canPark(vehicle, slot) method to centralize logic.
  • Prioritize allocation: motorcycles should use motorcycle slots first to preserve regular slots for cars.
  • Consider scalability: design should easily accommodate new vehicle types (e.g., bicycles) or slot types (e.g., electric charging).
  • Discuss trade-offs between a simple if-else approach and a more extensible strategy pattern.
  • Mention concurrency: if multiple vehicles are parking simultaneously, ensure thread-safe allocation.

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

Q3

Walk through how you would implement the unpark operation. What identifier does it take, and what state needs to be updated?

System DesignAPI & Integrations
Author's notes

I assumed slot id at first and the interviewer asked me to clarify.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the context: assume a parking system where a vehicle is parked at a location. Explain that unpark takes a unique identifier (e.g., vehicle ID or parking spot ID) and updates the state to mark the spot as available and the vehicle as unparked. Walk through the steps: validate the identifier, check current state, update state, and handle edge cases.

Pro tip: Mention idempotency and concurrency control (e.g., using a lock or version field) to prevent double-unparking, showing you think about real-world reliability.

1. Clarify the system context

Briefly state assumptions about the parking system, such as entities (Vehicle, ParkingSpot) and their states (parked, available).

2. Identify the input identifier

Specify that unpark takes a unique identifier, such as vehicle ID or parking spot ID, and explain why that choice matters.

3. Describe the state changes

Detail the state updates: mark the parking spot as available, update the vehicle's status to unparked, and record timestamps if needed.

4. Outline the operation flow

Walk through the steps: validate the identifier, check if currently parked, perform the state update, and handle errors (e.g., not found, already unparked).

5. Address edge cases and reliability

Discuss concurrency, idempotency, and failure recovery to ensure the operation is robust.

Key Points to Mention

  • Unique identifier (e.g., vehicle ID or spot ID) and its implications
  • State transition: from parked to unparked, and spot from occupied to available
  • Validation: check if the vehicle is currently parked before unparking
  • Idempotency: repeated unpark calls should not cause errors or inconsistent state
  • Concurrency control: use locks or optimistic concurrency to prevent race conditions
  • Error handling: return appropriate errors for invalid ID or already unparked

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

Q4

How would you extend the system to support billing, such as charging by hourly rate depending on vehicle or slot type?

Pricing & MonetizationTechnical Trade-offsSystem Design
Author's notes

Follow-up came at the end when I thought we were wrapping up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the billing requirements and constraints, then propose a modular pricing engine that decouples rate calculation from the core system. Walk through how you would integrate it with existing components, handle dynamic rates, and ensure scalability and correctness.

Pro tip: Emphasize idempotency and auditability in billing operations, as financial systems demand exactly-once processing and traceable calculations. Also, mention how you would handle rate changes and versioning to avoid retroactive billing errors.

1. Clarify Requirements

Ask questions to understand billing granularity, rate structures (hourly, per slot type), and any constraints like real-time vs. batch processing.

2. Design Pricing Engine

Propose a flexible pricing service that encapsulates rate rules, supports multiple rate types, and can be updated without redeploying core services.

3. Integrate with Existing System

Explain how the pricing engine would interact with vehicle/slot management, user accounts, and payment processing, using events or APIs.

4. Ensure Scalability and Reliability

Discuss partitioning, caching, and idempotent billing operations to handle high volume and prevent double-charging.

5. Address Edge Cases and Monitoring

Cover scenarios like rate changes, refunds, and disputes, and describe logging, metrics, and alerts for billing accuracy.

Key Points to Mention

  • Separation of concerns: pricing logic as a separate service from core booking/vehicle management
  • Support for dynamic rate tables and versioning to handle rate changes over time
  • Idempotency and exactly-once processing for billing events
  • Use of a rules engine or configuration-driven approach for flexible rate definitions
  • Integration with payment gateways and handling of failed transactions
  • Auditability and traceability of billing calculations for compliance and debugging

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