Product design question
Design an algorithm for an elevator during COVID-19.
- Product design
- Hard
Practice this question out loud. An AI interviewer asks it, follows up like a real interviewer would, and scores your answer. Type or speak.
Start a mock interview on this question · Mock interview from a job description
What this question tests
Designing an algorithmic system that balances safety constraints with normal operational efficiency.
How to approach it
- Clarify the goal: minimize close contact and crowding in elevators during a pandemic while keeping wait times reasonable.
- Define constraints: a maximum occupancy per car well below normal capacity, and spacing rules between passengers.
- Design the algorithm: batch requests by direction and destination floor to minimize stops and shared trips among strangers, prioritizing single-party or same-household groups per car.
- Add a queuing and signage system so people can see estimated wait and occupancy before boarding, reducing crowding at the door.
- Weigh the trade-off explicitly: stricter occupancy limits increase safety but increase wait times and building throughput pressure, especially at rush hour.
- Define success metrics: average wait time under capacity limits, and occupancy compliance rate.
What a strong answer includes
- Names a concrete occupancy rule, e.g. capping at 2 to 4 people per car depending on car size, as an explicit assumption.
- Proposes grouping same-party requests together to reduce unnecessary stranger contact, a specific and testable mechanism.
- Gives an illustrative trade-off, e.g. average wait time rising from 30 seconds to 90 seconds under the new limit, marked as an assumption.
- Addresses rush hour separately, since fixed occupancy limits could create serious lobby crowding without a queuing plan.
Common mistakes
- Designing only the elevator logic without addressing lobby crowding and queuing.
- Ignoring the explicit trade-off between safety and wait time or throughput.
Likely follow-up questions
- How would you handle rush hour crowding in the lobby?
- How would you communicate wait times to people waiting?
More product design questions
- Design a TV for a car.Google · Product design · Hard
- Design a refrigerator for the blind.Google · Product design · Hard
- How do you design a camera for the elderly?Google · Product design · Medium
- Redesign Twitter for eCommerce.Shopify · Product design · Hard
- How would you go about designing a new location sharing app for Google?Google · Product design · Medium
- How would you improve Google Home?Google · Product design · Easy
More questions from Google
Learn the skill behind it
Chapters of the AI PM course that teach what this question tests.
- Chapter 4: Discovery and strategy for AI products
- Chapter 7: AI UX and human oversight: design for a system that is wrong sometimes
- Chapter 14: Get the job: the AI PM interview loop