PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Google

Design a waitlist manager

Last updated: May 12, 2026

Quick Overview

This question evaluates object-oriented design and data-structure competency—modeling a FIFO waitlist API, managing unique party identifiers and edge cases, and reasoning about time and space complexity; it falls under the Software Engineering Fundamentals domain with emphasis on OOP and algorithms.

  • easy
  • Google
  • Software Engineering Fundamentals
  • Software Engineer

Design a waitlist manager

Company: Google

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Onsite

## Object-Oriented Design: Waitlist Manager Design a **waitlist management component** (e.g., for a restaurant or event) that maintains **FIFO order** for parties as they join a waitlist. ### Requirements Implement a class (or set of classes) with APIs similar to: - `add(partyId, partySize, metadata) -> void`: Add a party to the end of the waitlist. - `cancel(partyId) -> bool`: Remove a party if they are currently waiting. - `nextParty() -> Party | null`: Return (and remove) the next eligible party to be seated. - `peekNext() -> Party | null`: Return the next party without removing. - `position(partyId) -> int | null`: Return the party’s current position (optional follow-up). ### Constraints / Expectations - Aim for **efficient operations** (discuss time/space complexity). - Assume `partyId` is unique. - Handle edge cases (duplicate adds, canceling a non-existent party, empty waitlist). ### Follow-ups - How would you support skipping parties temporarily (e.g., they don’t respond) and re-adding them later? - How would your complexity change if you must support `position(partyId)` efficiently?

Quick Answer: This question evaluates object-oriented design and data-structure competency—modeling a FIFO waitlist API, managing unique party identifiers and edge cases, and reasoning about time and space complexity; it falls under the Software Engineering Fundamentals domain with emphasis on OOP and algorithms.

Related Interview Questions

  • Process Sharded Login Logs - Google (medium)
  • Design an ads retrieval service using a heap - Google (easy)
  • Design an editable sequence with marker - Google (medium)
  • Design a waitlist system with top/bottom K - Google (medium)
  • Implement matrix transforms and discuss eigenvalues - Google (medium)
Google logo
Google
Mar 1, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
8
0
Loading...

Object-Oriented Design: Waitlist Manager

Design a waitlist management component (e.g., for a restaurant or event) that maintains FIFO order for parties as they join a waitlist.

Requirements

Implement a class (or set of classes) with APIs similar to:

  • add(partyId, partySize, metadata) -> void : Add a party to the end of the waitlist.
  • cancel(partyId) -> bool : Remove a party if they are currently waiting.
  • nextParty() -> Party | null : Return (and remove) the next eligible party to be seated.
  • peekNext() -> Party | null : Return the next party without removing.
  • position(partyId) -> int | null : Return the party’s current position (optional follow-up).

Constraints / Expectations

  • Aim for efficient operations (discuss time/space complexity).
  • Assume partyId is unique.
  • Handle edge cases (duplicate adds, canceling a non-existent party, empty waitlist).

Follow-ups

  • How would you support skipping parties temporarily (e.g., they don’t respond) and re-adding them later?
  • How would your complexity change if you must support position(partyId) efficiently?

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Google•More Software Engineer•Google Software Engineer•Google Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL 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.