PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Coinbase

Design order stream with state transitions

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency in designing in-memory data structures, modeling state transitions and idempotent operations, indexing for efficient lookups by order_id and user_id, and reasoning about complexity and testability.

  • Medium
  • Coinbase
  • Coding & Algorithms
  • Software Engineer

Design order stream with state transitions

Company: Coinbase

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

Implement an in-memory order stream service with operations: add(order), delete(order_id), pause(order_id), resume(order_id); follow-up: delete_all_by_user(user_id). Define the order schema and valid state transitions, ensure operations are idempotent, and support efficient lookups by order_id and by user_id. Describe chosen data structures, expected time/space complexity, and provide example tests. Discuss how you would extend it for persistence and concurrency if required.

Quick Answer: This question evaluates proficiency in designing in-memory data structures, modeling state transitions and idempotent operations, indexing for efficient lookups by order_id and user_id, and reasoning about complexity and testability.

Related Interview Questions

  • Implement an In-Memory Database - Coinbase (hard)
  • Implement a Coin-Constrained Jump Strategy - Coinbase (hard)
  • Implement Game Physics and Block Mining - Coinbase (hard)
  • Compute Total Manual Distance - Coinbase (medium)
  • Implement a Flappy Bird Jump Agent - Coinbase
Coinbase logo
Coinbase
Jul 26, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
1
0

Implement an in-memory order stream service with operations: add(order), delete(order_id), pause(order_id), resume(order_id); follow-up: delete_all_by_user(user_id). Define the order schema and valid state transitions, ensure operations are idempotent, and support efficient lookups by order_id and by user_id. Describe chosen data structures, expected time/space complexity, and provide example tests. Discuss how you would extend it for persistence and concurrency if required.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ 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.