← Box Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Box system design round, one big question about elevator systems. Pretty open-ended and they clearly wanted to see how deep you could go on OOP and scheduling logic, not just a surface-level class diagram.

Questions Asked (1)

Q1

Design an object-oriented elevator system. Walk through the core entities, request handling, scheduling across multiple cars, state transitions, concurrency, edge cases, and how you'd extend it for things like express elevators or priority access.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one sprawled fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (e.g., number of floors, cars, traffic patterns) to scope the design. Then model the core entities and their interactions, focusing on request handling, scheduling, and state management. Finally, discuss concurrency, edge cases, and extensibility, justifying trade-offs.

Pro tip: Emphasize separation of concerns: keep scheduling logic decoupled from car state and request handling to allow easy extension and testing. Also, mention how you'd simulate or test the system to validate scheduling algorithms.

1. Clarify Requirements and Scope

Ask questions to understand scale, traffic patterns, and constraints (e.g., number of floors, cars, peak hours, priority needs). This ensures the design meets actual needs and avoids over-engineering.

2. Identify Core Entities and Relationships

Define classes like Elevator, Floor, Request, Scheduler, and Controller. Describe their responsibilities and how they interact (e.g., Elevator has state, Scheduler assigns requests).

3. Design Request Handling and Scheduling

Explain how requests are generated, queued, and assigned to cars. Discuss scheduling algorithms (e.g., SCAN, LOOK) and how to handle multiple cars efficiently.

4. Address Concurrency and State Transitions

Describe how to manage concurrent requests and state changes (e.g., using locks, actors, or message queues). Outline elevator states (idle, moving, doors open) and transitions.

5. Handle Edge Cases and Extensibility

Cover edge cases like emergency stops, overload, and power failures. Discuss how to extend for express elevators, priority access, or VIP floors via interfaces or strategy patterns.

Key Points to Mention

  • Use of design patterns: State pattern for elevator states, Strategy pattern for scheduling algorithms, Observer for floor requests.
  • Scheduling algorithm trade-offs: SCAN vs. LOOK vs. FCFS, and how to optimize for average wait time vs. fairness.
  • Concurrency handling: thread-safe request queues, locking mechanisms, or actor model to avoid race conditions.
  • State machine for elevator: define states (Idle, MovingUp, MovingDown, DoorsOpen) and transitions triggered by events.
  • Edge cases: emergency stop, overload detection, power outage, and how to handle multiple simultaneous requests.
  • Extensibility: using interfaces for priority requests, express elevators, and adding new scheduling strategies without modifying core logic.

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