Skip to main content
All Questions

Implement a task management system built up over four levels.

Unlock detailed company stats for this questionUpgrade

Build a task management system in four levels.

Level 1:

  • addTask(timestamp, name, priority) adds a task and returns its auto-incremented ID (task_id_1, task_id_2, ...).
  • updateTask(timestamp, taskId, name, priority) updates an existing task and returns true on success.
  • getTask(taskId) returns the task details as JSON {name, priority}.

Level 2:

  • searchTask(timestamp, nameFilter, limit) returns task names matching the filter, sorted by descending priority then ascending task ID, limited to limit.
  • taskList(limit) returns task names sorted by ascending task ID then ascending timestamp, limited to limit.

Level 3 (timestamps are strictly increasing):

  • addUser(timestamp, userId, quota) adds a user with a maximum number of active (unfinished) tasks.
  • assignTask(timestamp, taskId, userId, finishTime) assigns a task to a user with available quota, freeing the quota at finishTime.
  • getTaskUser(timestamp, userId) returns all tasks assigned to the user where startTime <= timestamp <= finishTime.

Level 4: completeTask(...) marks a task as completed, plus one more function. The exact requirements for this level are not specified.

Format · Meta online assessment on CodeSignal, built up in levels.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.