← Google Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

Got a system design question at Google about elevator scheduling for a 100-floor hotel with two elevators. Pretty classic infrastructure design problem but there's more to it than you'd think once you start poking at edge cases.

Questions Asked (1)

Q1

A hotel has 100 floors and two elevators. Design an algorithm to determine how the elevators should pick up guests.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

I started with the obvious stuff, nearest elevator dispatching, direction priority, that kind of thing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem requirements and assumptions, such as guest arrival patterns and elevator constraints. Then propose a high-level algorithm that optimizes for average wait time and throughput, and discuss trade-offs between different strategies. Finally, outline how you would test and refine the algorithm.

Pro tip: Demonstrate awareness of real-world constraints like peak hours and energy efficiency, and suggest a hybrid approach that adapts to demand. This shows you think beyond textbook algorithms and consider practical deployment.

1. Clarify Requirements

Ask questions to understand the expected guest distribution, arrival rates, and elevator specifications. Establish whether the goal is to minimize wait time, travel time, or energy consumption.

2. Define Metrics and Constraints

Identify key performance indicators (e.g., average wait time, maximum wait time) and constraints (e.g., elevator capacity, speed, floor restrictions). This sets the optimization criteria.

3. Propose Algorithm

Describe a high-level algorithm, such as a centralized dispatcher that assigns elevators based on current requests and predicted demand. Consider using heuristics like nearest-elevator or sector-based zoning.

4. Analyze Trade-offs

Compare your approach with alternatives (e.g., independent operation, destination dispatch) in terms of complexity, fairness, and efficiency. Discuss scenarios where each performs best.

5. Test and Iterate

Outline how you would simulate or test the algorithm under various conditions, and how you would refine it based on performance data.

Key Points to Mention

  • Elevator scheduling algorithms (e.g., SCAN, LOOK, destination dispatch)
  • Optimization objectives: minimize average wait time, maximize throughput, reduce energy consumption
  • Handling peak demand and traffic patterns (e.g., morning rush, evening rush)
  • Real-time adaptation and predictive modeling using historical data
  • Fairness and starvation prevention (ensuring no guest waits indefinitely)
  • Scalability and fault tolerance (e.g., if one elevator fails)

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