PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Coinbase

Design a task management system with TTL

Last updated: Mar 29, 2026

Quick Overview

This question evaluates the ability to design in-memory data models and algorithms for time-based task assignment semantics, including TTL-based expiration, per-user quotas, priority-based listing, and correct handling of multiple concurrent assignments and completion rules.

  • medium
  • Coinbase
  • Software Engineering Fundamentals
  • Software Engineer

Design a task management system with TTL

Company: Coinbase

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

## Task Management System (in-memory) Design and implement an in-memory task management system that supports tasks, users, task assignment with TTL (time-to-live), and time-based completion/expiration rules. ### Entities - **Task**: `id` (unique), `name`, `priority` (higher number = higher priority, or clearly define). - **User**: `id` (unique), and a **quota** = maximum number of **active task assignments** the user may have at once. - **Task Assignment**: assigns a task to a user at a `startTime`, with a `ttl` (duration). The assignment is **active** on `[startTime, startTime + ttl)` and **expired** at or after `startTime + ttl`. ### Requirements / APIs 1. **Task CRUD** - Create a task. - Get a task by id. - Update a task (e.g., name/priority). 2. **Task listing** - Return the top **N** tasks by priority. - Return the top **N** tasks by priority **whose name contains a given substring**. 3. **Users + assignment with TTL** - Add a user with a quota. - Assign a task to a user with a TTL at a given `startTime`. - You may assign **multiple tasks to the same user**. - You may assign the **same task to multiple users**. - (If the same task is assigned multiple times to the same user at different start times, treat them as distinct assignments.) - List a user’s **active** tasks at a given time `t`. 4. **Completion + expiration rules** - Complete a task for a user at a given time `t`. - You **cannot** complete an **expired** assignment. - If there are **multiple active assignments** for the same `(userId, taskId)`, completing that `taskId` completes the one with the **earliest startTime**. - List a user’s **expired** tasks at a given time `t`. ### Clarifications to state during the interview - How ties in priority are broken (e.g., higher priority first, then by `taskId` lexicographically). - Whether “list tasks by priority” returns **tasks** (unique by taskId) or **assignments** (can repeat taskId). (Common approach: listing in (2) is over tasks; user lists in (3)/(4) are over assignments.) - Input constraints and expected complexity (aim for efficient queries; in-memory only).

Quick Answer: This question evaluates the ability to design in-memory data models and algorithms for time-based task assignment semantics, including TTL-based expiration, per-user quotas, priority-based listing, and correct handling of multiple concurrent assignments and completion rules.

Related Interview Questions

  • Debug and Extend Cursor Queries - Coinbase (hard)
  • Implement a blog feed with fetching and state - Coinbase (medium)
  • Implement a Reusable Dropdown Component - Coinbase (hard)
Coinbase logo
Coinbase
Feb 11, 2026, 12:00 AM
Software Engineer
Take-home Project
Software Engineering Fundamentals
19
0

Task Management System (in-memory)

Design and implement an in-memory task management system that supports tasks, users, task assignment with TTL (time-to-live), and time-based completion/expiration rules.

Entities

  • Task : id (unique), name , priority (higher number = higher priority, or clearly define).
  • User : id (unique), and a quota = maximum number of active task assignments the user may have at once.
  • Task Assignment : assigns a task to a user at a startTime , with a ttl (duration). The assignment is active on [startTime, startTime + ttl) and expired at or after startTime + ttl .

Requirements / APIs

  1. Task CRUD
    • Create a task.
    • Get a task by id.
    • Update a task (e.g., name/priority).
  2. Task listing
    • Return the top N tasks by priority.
    • Return the top N tasks by priority whose name contains a given substring .
  3. Users + assignment with TTL
    • Add a user with a quota.
    • Assign a task to a user with a TTL at a given startTime .
      • You may assign multiple tasks to the same user .
      • You may assign the same task to multiple users .
      • (If the same task is assigned multiple times to the same user at different start times, treat them as distinct assignments.)
    • List a user’s active tasks at a given time t .
  4. Completion + expiration rules
    • Complete a task for a user at a given time t .
    • You cannot complete an expired assignment.
    • If there are multiple active assignments for the same (userId, taskId) , completing that taskId completes the one with the earliest startTime .
    • List a user’s expired tasks at a given time t .

Clarifications to state during the interview

  • How ties in priority are broken (e.g., higher priority first, then by taskId lexicographically).
  • Whether “list tasks by priority” returns tasks (unique by taskId) or assignments (can repeat taskId). (Common approach: listing in (2) is over tasks; user lists in (3)/(4) are over assignments.)
  • Input constraints and expected complexity (aim for efficient queries; in-memory only).

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
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.