← PayPal Interview Insights

PayPal·Data Scientist·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

System design round at PayPal for a Data Scientist role. The question was about elevator control policy, which I was not expecting at all for a DS position. Felt more like a software engineering interview honestly.

Questions Asked (1)

Q1

Design a control policy for a single elevator serving four stops (basement, floors 1 through 3). Walk through what you're optimizing for, the physical constraints, what state the controller tracks, how it decides the next stop, the data structures involved, and how you'd simulate and compare different scheduling strategies.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This was a lot to unpack.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the optimization objective (e.g., minimize average wait time) and the physical constraints (speed, capacity, single car). Then describe the controller's state representation, decision logic (e.g., SCAN algorithm), data structures, and a simulation framework to compare strategies like FCFS, SCAN, and LOOK.

Pro tip: Frame the problem as a sequential decision-making task under uncertainty, and emphasize how you would use simulation to evaluate trade-offs between average wait time and worst-case wait time, which is crucial for data science roles.

1. Define objectives and constraints

Clarify what you're optimizing for (e.g., minimize average wait time, minimize max wait time, energy efficiency) and list physical constraints (e.g., speed, acceleration, capacity, single car, four stops).

2. Design state representation

Specify what the controller tracks: current floor, direction, set of pending requests (up/down per floor), passenger load, and possibly time-based metrics.

3. Choose decision policy and data structures

Select a scheduling algorithm (e.g., FCFS, SCAN, LOOK, or a custom heuristic) and describe data structures (e.g., queues, sets, priority queues) to manage requests efficiently.

4. Simulate and compare strategies

Outline a discrete-event simulation: generate random passenger arrivals, model elevator movement, and collect metrics like average wait time, max wait time, and throughput. Compare policies under different arrival patterns.

5. Analyze trade-offs and recommend

Discuss trade-offs between simplicity and optimality, and recommend a policy based on simulation results, considering real-world factors like passenger patience and energy consumption.

Key Points to Mention

  • Optimization objectives: average wait time, max wait time, energy consumption, fairness
  • Physical constraints: speed, acceleration, capacity, single car, four stops
  • State variables: current floor, direction, pending requests, passenger load
  • Scheduling algorithms: FCFS, SCAN, LOOK, and their pros/cons
  • Data structures: queues for requests, sets for pending stops, priority queues for direction-based ordering
  • Simulation approach: discrete-event simulation, random arrival generation, performance metrics

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