← Coinbase Interview Insights

Coinbase·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026Remote

Summary

Coinbase software engineer interview with a multi-part object-oriented design problem. The problem built on itself across four stages, each adding more complexity. Pretty grueling but the progression felt deliberate rather than random.

Questions Asked (4)

Q1

Design a task management system where tasks have a unique ID, name, and priority. Implement create, get, and update operations.

System DesignData ModelingAlgorithms & Data Structures
Author's notes

Straightforward enough to start.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a clean data model with a unique ID, name, and priority. Outline the API operations (create, get, update) and discuss storage choices, indexing, and concurrency handling. Walk through the design with a focus on correctness, performance, and extensibility.

Pro tip: Demonstrate awareness of real-world concerns like idempotency, race conditions, and priority updates affecting ordering. Mention how you'd handle scaling and monitoring, showing you think beyond basic CRUD.

1. Clarify Requirements

Ask about expected scale, consistency needs, and whether tasks need ordering by priority. Confirm if updates can change priority and how conflicts should be resolved.

2. Design Data Model

Define a Task entity with id (UUID or auto-increment), name (string), and priority (integer or enum). Discuss indexing on priority for efficient retrieval.

3. Define API Operations

Specify create (POST /tasks), get (GET /tasks/{id}), and update (PUT/PATCH /tasks/{id}). Include request/response schemas and status codes.

4. Choose Storage & Handle Concurrency

Select a database (SQL for ACID, NoSQL for scale) and discuss optimistic locking or versioning to handle concurrent updates.

5. Discuss Scalability & Trade-offs

Address caching, sharding, and replication. Compare SQL vs NoSQL and explain how priority updates affect ordering and performance.

Key Points to Mention

  • Unique ID generation strategies (UUID, auto-increment, Snowflake) and their trade-offs
  • Data modeling with priority as an integer or enum, and indexing for efficient priority-based queries
  • API design following REST principles, including idempotency for create and update operations
  • Concurrency control mechanisms like optimistic locking (version field) or pessimistic locking
  • Storage engine choices: SQL vs NoSQL, and their implications for consistency and scalability
  • Handling priority updates: reordering, potential race conditions, and performance impact

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Extend the system to support listing the top N tasks by priority overall, and also the top N tasks by priority that contain a specific substring in their name.

Algorithms & Data StructuresAPI & IntegrationsTechnical Trade-offs
Author's notes

This is where I slowed down.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: define priority ordering, tie-breaking, and whether the substring match is case-sensitive. Then propose a data structure that supports efficient top-N queries, such as a balanced BST or heap, and for substring filtering, consider a trie or inverted index. Discuss trade-offs between precomputation and on-the-fly filtering, and outline API design for both queries.

Pro tip: Mention that for substring queries, a naive scan is O(M) per query, but an index like a suffix tree or n-gram index can reduce it; however, consider update frequency and memory overhead. Also, suggest using a priority queue with a size limit for top-N to avoid sorting the entire set.

1. Clarify Requirements

Ask about priority definition, tie-breaking rules, substring matching semantics (case sensitivity, partial words), and expected query frequency vs. update frequency.

2. Choose Data Structures

For top-N overall, use a balanced BST or a max-heap with a size cap. For substring filtering, consider a trie, suffix tree, or inverted index on task names.

3. Design Query Algorithms

For top-N overall, traverse the BST in reverse order or pop from heap. For substring, first retrieve matching tasks via index, then apply top-N selection on that subset.

4. Analyze Trade-offs

Compare time/space complexity of different approaches, and discuss whether to maintain separate indexes or combine them, considering update costs and memory.

5. Define API and Extensibility

Specify method signatures, e.g., getTopNTasks(int n) and getTopNTasksByNameSubstring(int n, String substring). Mention pagination or streaming for large N.

Key Points to Mention

  • Priority queue or balanced BST for efficient top-N retrieval
  • Substring indexing (trie, suffix tree, inverted index) for fast filtering
  • Trade-offs between precomputation and on-the-fly filtering
  • Handling ties in priority (e.g., by task ID or creation time)
  • Case sensitivity and normalization for substring matching
  • API design for clarity and potential pagination

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Add a user model with a quota (max active tasks). Allow assigning a task to a user with a TTL, where the same task can be assigned to multiple users and a user can hold multiple tasks. Implement a way to list a user's currently active assignments.

System DesignData ModelingTechnical Trade-offs
Author's notes

The quota constraint tripped me up more than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a data model with User, Task, and Assignment entities, enforcing quotas and TTLs. Discuss trade-offs between SQL and NoSQL, and how to efficiently query active assignments.

Pro tip: Mention using a composite index on (user_id, expires_at) and a partial index for active assignments to ensure fast lookups and efficient cleanup. Also, consider using a TTL index in MongoDB or a scheduled job for expiration.

1. Clarify Requirements and Scale

Ask about expected read/write patterns, scale (users, tasks, assignments), and whether TTL is strict or eventual. Confirm if quota is per user and if tasks can be assigned to multiple users simultaneously.

2. Design Data Model

Propose tables/collections for User (with quota), Task, and Assignment (with user_id, task_id, expires_at). Discuss primary keys, foreign keys, and indexes.

3. Enforce Quota and TTL

Explain how to enforce max active tasks per user (e.g., count active assignments before insert) and how TTL is implemented (e.g., expires_at field, background job, or database TTL feature).

4. Query Active Assignments

Describe how to list a user's active assignments efficiently, using an index on (user_id, expires_at) and filtering by expires_at > now.

5. Discuss Trade-offs and Scalability

Compare SQL vs NoSQL, discuss consistency vs availability, and how to handle high write throughput and cleanup of expired assignments.

Key Points to Mention

  • Data model: User (id, quota), Task (id), Assignment (user_id, task_id, expires_at)
  • Quota enforcement: check active count before insert, possibly with transaction or atomic counter
  • TTL implementation: expires_at timestamp, background cleanup, or database TTL index
  • Indexing: composite index on (user_id, expires_at) for active assignments query
  • Trade-offs: SQL vs NoSQL, consistency models, and scalability of quota checks
  • Handling concurrent assignments and race conditions (e.g., using transactions or optimistic locking)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Add a complete-task operation that takes a timestamp. If a task has multiple assignments, complete the one with the earliest start time. Assignments past their TTL are expired and cannot be completed. Also implement listing a user's expired assignments as of a given time.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

Hardest part of the whole thing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data model and requirements, then design data structures that support efficient completion and expiration queries. Discuss trade-offs between different approaches (e.g., scanning vs. indexing) and outline algorithms for completing the earliest-start assignment and listing expired assignments. Finally, analyze time and space complexity and consider edge cases.

Pro tip: Demonstrate awareness of real-world constraints by discussing how to handle concurrent updates and how to efficiently query expired assignments without full scans, perhaps using a time-ordered index or bucketing by TTL.

1. Clarify Requirements and Data Model

Ask questions to understand the task, assignment, and user entities, their relationships, and the exact semantics of TTL and expiration. Confirm whether timestamps are inclusive/exclusive and how to handle ties.

2. Design Data Structures

Propose data structures to store tasks, assignments, and user-assignment mappings. Consider how to efficiently find the earliest-start assignment for a task and how to list expired assignments for a user.

3. Implement Complete-Task Operation

Outline the algorithm: given a task and timestamp, filter out expired assignments, then select the one with the earliest start time. Discuss how to update state (e.g., mark assignment as completed).

4. Implement List Expired Assignments

Describe how to retrieve all assignments for a user that are expired as of the given time. Consider whether to maintain a separate index or compute on the fly.

5. Analyze Complexity and Trade-offs

Discuss time and space complexity of the proposed solution, and compare with alternatives (e.g., scanning vs. indexing). Mention potential optimizations and scalability considerations.

Key Points to Mention

  • Definition of TTL and expiration: how to compute expiration time from start time and TTL.
  • Data structures for efficient retrieval: e.g., priority queue or sorted list for earliest start, and time-based indexing for expiration.
  • Handling multiple assignments: ensuring the earliest-start non-expired assignment is selected.
  • Edge cases: no assignments, all expired, ties in start time, timestamp exactly at expiration.
  • Concurrency and consistency: how to handle simultaneous completions or updates.
  • Trade-offs between simplicity and performance: e.g., O(n) scan vs. O(log n) with indexing, and memory overhead.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.