Don't remember the title lol
Level 1
addTask(timestamp, name, priority): string
Adds a new task and returns its ID.
Task IDs are auto-incremented (task_id_1, task_id_2, …), starting at 1.
updateTask(timestamp, taskId, name, priority): boolean
Updates an existing task.
Returns true if the task exists and is updated, otherwise false.
getTask(taskId): string
Returns the task details as JSON:
{ "name": string, "priority": number }
Level 2
searchTask(timestamp, nameFilter, limit): string[]
Returns a list of task names matching nameFilter.
Sorting rules:
Descending by priority
Ascending by task ID when priorities are equal
The result size is limited to limit.
taskList(limit): string[]
Returns a list of task names sorted by:
Ascending task ID
Ascending timestamp if IDs are equal
The result size is limited to limit.
Level 3
addUser(timestamp, userId, quota): boolean
Adds a user if they do not already exist.
quota represents the maximum number of active (unfinished) tasks a user can have.
assignTask(timestamp, taskId, userId, finishTime): boolean
Assigns a task to a user if the user has available quota.
finishTime indicates when the task is completed.
Once a task is completed, the user’s quota is freed, allowing new assignments.
getTaskUser(timestamp, userId): task[]
Returns all tasks assigned to the user where:
startTime ≤ timestamp ≤ finishTime
General Notes
timestamp is strictly increasing and always moves forward in time.
Level 4
completeTask(...)
Marks a specific task as completed.
(Exact requirements not fully remembered.)
There was one additional function at this level, but its details are not recalled.