PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Instacart

Design a task system with assignments

Last updated: Mar 29, 2026

Quick Overview

This question evaluates data modeling, API/interface design, and system-design competencies—focusing on entity relationships (Task versus Assignment), CRUD semantics, and ranking/sorting behavior in an in-memory task management system.

  • medium
  • Instacart
  • Software Engineering Fundamentals
  • Software Engineer

Design a task system with assignments

Company: Instacart

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

You are implementing an in-memory **task management system** (no database required). The system needs basic CRUD features and some ranking/sorting functionality. ### Part A — Core data model A **Task** can be assigned to **multiple people**. Model this using a separate **Assignment** concept. Design classes (or data structures) such that: - `Task` stores only **general metadata**, e.g. `taskId`, `title`, `description`, `createdAt`, `priority`, etc. - Each **Assignment** represents “this task assigned to this person” and stores assignment-specific fields: - `assigneeId` - `startTime` - `endTime` - any other assignment-specific info - A single task can have 0..N assignments. Explain: - What fields belong on `Task` vs `Assignment`, and why. - How you will link assignments to tasks (IDs, references). ### Part B — Operations (CRUD + ranking) Specify and implement (at least at the interface level) operations such as: - Create / read / update / delete tasks - Create / update / delete assignments - List tasks with a “ranking”/ordering requirement (e.g., sort by priority, due date, created time, or a composite key) Clarify: - What should happen when deleting a task that has assignments. - What your ranking key is and whether ties are stable. ### Part C — Production/refactor discussion If this were production code, how would you refactor the solution? Discuss layering (API/service/storage), validation, error handling, testability, and how you’d evolve the design when requirements change.

Quick Answer: This question evaluates data modeling, API/interface design, and system-design competencies—focusing on entity relationships (Task versus Assignment), CRUD semantics, and ranking/sorting behavior in an in-memory task management system.

Related Interview Questions

  • Simulate bus boarding with priority and wheelchairs - Instacart (medium)
  • Design a bus simulation metric - Instacart (hard)
  • Explain how to understand a large codebase fast - Instacart (hard)
Instacart logo
Instacart
Jan 1, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
8
0
Loading...

You are implementing an in-memory task management system (no database required). The system needs basic CRUD features and some ranking/sorting functionality.

Part A — Core data model

A Task can be assigned to multiple people. Model this using a separate Assignment concept.

Design classes (or data structures) such that:

  • Task stores only general metadata , e.g. taskId , title , description , createdAt , priority , etc.
  • Each Assignment represents “this task assigned to this person” and stores assignment-specific fields:
    • assigneeId
    • startTime
    • endTime
    • any other assignment-specific info
  • A single task can have 0..N assignments.

Explain:

  • What fields belong on Task vs Assignment , and why.
  • How you will link assignments to tasks (IDs, references).

Part B — Operations (CRUD + ranking)

Specify and implement (at least at the interface level) operations such as:

  • Create / read / update / delete tasks
  • Create / update / delete assignments
  • List tasks with a “ranking”/ordering requirement (e.g., sort by priority, due date, created time, or a composite key)

Clarify:

  • What should happen when deleting a task that has assignments.
  • What your ranking key is and whether ties are stable.

Part C — Production/refactor discussion

If this were production code, how would you refactor the solution? Discuss layering (API/service/storage), validation, error handling, testability, and how you’d evolve the design when requirements change.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

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