Implement a task management system built up over 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, returning 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: 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. The timestamp is strictly increasing. Level 4: completeTask(...) marks a task as completed, plus one more function; the exact requirements are not fully remembered.
Format · Meta online assessment on CodeSignal, built up in levels.
Community answers
Related questions
Build a table management system.Implement a GPU credit management system.Design and implement a coupon management system.Related courses


