PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Google

Design a waitlist system with top/bottom K

Last updated: Mar 29, 2026

Quick Overview

This question evaluates object-oriented design, data structure selection, and algorithmic complexity reasoning for implementing a waitlist that supports join/leave operations and top-K/bottom-K queries.

  • medium
  • Google
  • Software Engineering Fundamentals
  • Software Engineer

Design a waitlist system with top/bottom K

Company: Google

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

## Object-Oriented Design: Waitlist System Design and implement (at the class/interface level) a **waitlist system** that supports the following operations: ### Core requirements 1. **Join the waitlist**: add a user/customer to the end of the waitlist. 2. **Leave the waitlist**: remove a specific user/customer from the waitlist. 3. **View the queue**: return the current waitlist order. 4. **Get top K**: return the first `k` users in the waitlist. 5. **Get bottom K**: return the last `k` users in the waitlist. ### Clarifications / assumptions (you may choose reasonable defaults) - Each user has a unique `userId`. - If a user tries to join twice, define the expected behavior (e.g., no-op, move to end, or error). - If `k` is larger than the queue size, return as many as possible. - Aim for clean OOD and efficient time complexity for typical operations. Provide the main classes, methods, and the data structures you would use, along with time/space complexity and key edge cases.

Quick Answer: This question evaluates object-oriented design, data structure selection, and algorithmic complexity reasoning for implementing a waitlist that supports join/leave operations and top-K/bottom-K queries.

Related Interview Questions

  • Process Sharded Login Logs - Google (medium)
  • Design an ads retrieval service using a heap - Google (easy)
  • Design a waitlist manager - Google (easy)
  • Design an editable sequence with marker - Google (medium)
  • Implement matrix transforms and discuss eigenvalues - Google (medium)
Google logo
Google
Feb 11, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
4
0
Loading...

Object-Oriented Design: Waitlist System

Design and implement (at the class/interface level) a waitlist system that supports the following operations:

Core requirements

  1. Join the waitlist : add a user/customer to the end of the waitlist.
  2. Leave the waitlist : remove a specific user/customer from the waitlist.
  3. View the queue : return the current waitlist order.
  4. Get top K : return the first k users in the waitlist.
  5. Get bottom K : return the last k users in the waitlist.

Clarifications / assumptions (you may choose reasonable defaults)

  • Each user has a unique userId .
  • If a user tries to join twice, define the expected behavior (e.g., no-op, move to end, or error).
  • If k is larger than the queue size, return as many as possible.
  • Aim for clean OOD and efficient time complexity for typical operations.

Provide the main classes, methods, and the data structures you would use, along with time/space complexity and key edge cases.

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.