PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Amazon

Design a Concurrent Restaurant Waitlist and Seating System

Last updated: Jul 22, 2026

Quick Overview

Design a concurrent restaurant waitlist that prefers an exact table-size match before the earliest party that fits. Cover atomic party and table transitions, cancellation races, fairness, idempotent SMS delivery, recovery, and data structures that preserve the seating policy.

  • easy
  • Amazon
  • Software Engineering Fundamentals
  • Software Engineer

Design a Concurrent Restaurant Waitlist and Seating System

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

# Design a Concurrent Restaurant Waitlist and Seating System Design a restaurant system with a configurable set of tables and a FIFO waitlist of parties. Each party has a unique ID, size, arrival sequence, and SMS contact. When a table becomes available, prefer the earliest waiting party whose size exactly equals the table's capacity; if none exists, seat the earliest party that fits. Thus an eight-person party may bypass an earlier two-person party when an eight-seat table opens. The assignment must be safe when parties join concurrently and multiple tables become available at the same time. Once an assignment commits, the system sends the party an SMS notification. Explain classes, data structures, APIs, synchronization, failure handling, and tests; pseudocode is sufficient. ### Constraints & Assumptions - One party can hold at most one active waitlist entry or table assignment. - One table can have at most one active party. - SMS delivery may fail or repeat and must not determine whether the table assignment commits. - Cancellation can race with seating, so define a deterministic winner. ### Clarifying Questions to Ask - May tables be combined, and can a party accept a table smaller than its size? - How long does a party have to confirm after notification? - Does an exact-size preference override FIFO indefinitely, or is aging required? - Is the system in one process or shared by several hosts and service instances? ### What a Strong Answer Covers - Explicit seating policy and stable arrival ordering - Atomic party/table state transitions under concurrency - Data structures that support exact-size preference and FIFO fallback - Reliable, idempotent notification after commit - Cancellation, timeout, fairness, recovery, and race-focused tests ### Follow-up Questions - How would you prevent starvation of small parties? - What if an SMS succeeds but the notifier crashes before recording success? - How can two hosts avoid assigning the same table? - What changes when tables may be combined?

Quick Answer: Design a concurrent restaurant waitlist that prefers an exact table-size match before the earliest party that fits. Cover atomic party and table transitions, cancellation races, fairness, idempotent SMS delivery, recovery, and data structures that preserve the seating policy.

Related Interview Questions

  • Implement an Accessible Autocomplete Search Component - Amazon (medium)
  • Debug Watch List Movie Operations - Amazon (medium)
  • Design an advertiser metrics tracking platform - Amazon (medium)
  • Clarify and Solve a Rotate-or-Flip Array Puzzle - Amazon (medium)
|Home/Software Engineering Fundamentals/Amazon

Design a Concurrent Restaurant Waitlist and Seating System

Amazon logo
Amazon
Jul 7, 2026, 12:00 AM
easySoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
23
0

Design a Concurrent Restaurant Waitlist and Seating System

Design a restaurant system with a configurable set of tables and a FIFO waitlist of parties. Each party has a unique ID, size, arrival sequence, and SMS contact. When a table becomes available, prefer the earliest waiting party whose size exactly equals the table's capacity; if none exists, seat the earliest party that fits. Thus an eight-person party may bypass an earlier two-person party when an eight-seat table opens.

The assignment must be safe when parties join concurrently and multiple tables become available at the same time. Once an assignment commits, the system sends the party an SMS notification. Explain classes, data structures, APIs, synchronization, failure handling, and tests; pseudocode is sufficient.

Constraints & Assumptions

  • One party can hold at most one active waitlist entry or table assignment.
  • One table can have at most one active party.
  • SMS delivery may fail or repeat and must not determine whether the table assignment commits.
  • Cancellation can race with seating, so define a deterministic winner.

Clarifying Questions to Ask Guidance

  • May tables be combined, and can a party accept a table smaller than its size?
  • How long does a party have to confirm after notification?
  • Does an exact-size preference override FIFO indefinitely, or is aging required?
  • Is the system in one process or shared by several hosts and service instances?

What a Strong Answer Covers Guidance

  • Explicit seating policy and stable arrival ordering
  • Atomic party/table state transitions under concurrency
  • Data structures that support exact-size preference and FIFO fallback
  • Reliable, idempotent notification after commit
  • Cancellation, timeout, fairness, recovery, and race-focused tests

Follow-up Questions Guidance

  • How would you prevent starvation of small parties?
  • What if an SMS succeeds but the notifier crashes before recording success?
  • How can two hosts avoid assigning the same table?
  • What changes when tables may be combined?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.