PracHub
QuestionsCoachesLearningGuidesInterview Prep
|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)
|Home/Software Engineering Fundamentals/Coinbase

Design a task management system with TTL

Coinbase logo
Coinbase
Feb 11, 2026, 12:00 AM
mediumSoftware EngineerTake-home ProjectSoftware Engineering Fundamentals
27
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).
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

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
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
  • AI Coding 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.