Reported September 2026
Coinbasehash table

Task Management System

Reported by candidates from Coinbase's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Coinbase OA. Under 2s to a working solution.
Founder's read

Coinbase reported this one in September 2026, and the detail that stands out is the three-way status: OPEN, ASSIGNED, COMPLETED, with a different error string for each bad transition. It's a task-management simulation, not a hard algorithm. You process up to 100000 operations in order and return one row per operation. If you have the OA in a day or two, the risk is sloppy state handling, not cleverness. StealthCoder is the safety net on the live OA if you blank mid-problem, but the design below is simple enough to carry in your head.

The problem

Implement a task-management service by processing the rows in operations from left to right. The service starts with no tasks. Each operation has a strictly increasing integer timestamp as its second value.
Every task stores a task identifier, text, integer priority, due timestamp, optional assignee, and status. Its status is OPEN, ASSIGNED, or COMPLETED.
["WRITE", timestamp, taskId, text, priority, dueAt] creates a new open, unassigned task. If an unfinished task with that identifier already exists, it replaces the text, priority, and due timestamp while preserving its assignee. A completed task cannot be written again.
["READ", timestamp, taskId] returns [taskId, text, priority, dueAt, assignee, status]. The assignee is the empty string for an open task. A missing task returns an empty row.
["SEARCH", timestamp, query] returns the identifiers of unfinished tasks whose text contains query as a case-sensitive substring.
["LIST", timestamp] returns the identifiers of all unfinished tasks.
["ASSIGN", timestamp, taskId, userId] assigns or reassigns an unfinished task to userId.
["COMPLETE", timestamp, taskId] completes an assigned unfinished task.
["CHECK_OVERDUE", timestamp, userId] returns unfinished tasks assigned to userId whose due timestamp is strictly less than the operation timestamp.
SEARCH and LIST order task identifiers by decreasing priority, breaking ties by task identifier in ascending order. CHECK_OVERDUE orders identifiers by increasing due timestamp, then by task identifier in ascending order.
Return one string row for every operation. A successful state-changing operation returns ["OK"]. A missing task returns ["NOT_FOUND"] for ASSIGN or COMPLETE. An operation on a completed task returns ["NOT_ACTIVE"]. Completing an open task returns ["NOT_ASSIGNED"]. Query operations may return an empty row.

Function
processTaskOperations(operations: String[][]) → String[][]

Examples
Example 1
operations = [["WRITE","1","t1","Fix login","5","10"],["WRITE","2","t2","Add logs","8","6"],["LIST","3"],["SEARCH","4","Fix"],["ASSIGN","5","t1","u1"],["CHECK_OVERDUE","10","u1"],["CHECK_OVERDUE","11","u1"],["COMPLETE","12","t1"],["CHECK_OVERDUE","13","u1"],["READ","14","t1"]]
return = [["OK"],["OK"],["t2","t1"],["t1"],["OK"],[],["t1"],["OK"],[],["t1","Fix login","5","10","u1","COMPLETED"]]
The list places higher-priority t2 first. Task t1 is not overdue at timestamp 10, becomes overdue at 11, and leaves overdue results after completion.
Example 2
operations = [["WRITE","1","a","draft","1","9"],["COMPLETE","2","a"],["ASSIGN","3","a","lee"],["WRITE","4","a","revised","7","12"],["READ","5","a"],["COMPLETE","6","a"],["WRITE","7","a","again","9","20"],["ASSIGN","8","a","sam"]]
return = [["OK"],["NOT_ASSIGNED"],["OK"],["OK"],["a","revised","7","12","lee","ASSIGNED"],["OK"],["NOT_ACTIVE"],["NOT_ACTIVE"]]
An update preserves the assignee. Once a is completed, later writes and assignments are rejected.
Example 3
operations = [["READ","1","missing"],["ASSIGN","2","missing","u"],["WRITE","3","b","beta","2","15"],["WRITE","4","a","alpha","2","20"],["WRITE","5","c","gamma","3","15"],["ASSIGN","6","b","u"],["ASSIGN","7","c","u"],["LIST","8"],["CHECK_OVERDUE","16","u"]]
return = [[],["NOT_FOUND"],["OK"],["OK"],["OK"],["OK"],["OK"],["c","a","b"],["b","c"]]
LIST sorts by priority and then identifier, while overdue results sort by due timestamp and then identifier.

Constraints
1 <= operations.length <= 100000.
Operation timestamps are distinct, strictly increasing integers in [0, 10^9].
Each WRITE has timestamp < dueAt <= 10^9 and a priority in [-10^9, 10^9].
Task and user identifiers contain 1 to 40 ASCII letters, digits, underscores, or hyphens.
Task text and nonempty search queries contain 1 to 80 printable ASCII characters.
The total number of task records examined by all SEARCH, LIST, and CHECK_OVERDUE operations is at most 200000.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The core is a hash map from taskId to a record holding text, priority, dueAt, assignee, and status. WRITE, READ, ASSIGN and COMPLETE are O(1) lookups. SEARCH, LIST and CHECK_OVERDUE just scan the map, filter out COMPLETED tasks, and sort. The constraint that total records examined across those queries is at most 200000 means a plain scan is fine, so don't build heaps or indexes. The pitfalls are all in the rules. WRITE on an unfinished task keeps the assignee, and WRITE on a completed one returns NOT_ACTIVE. COMPLETE on an open task returns NOT_ASSIGNED, but on a completed task it returns NOT_ACTIVE. Overdue is strictly less than the timestamp, so due 10 at time 10 is not overdue. Sorting differs per query: priority descending then id ascending, versus due ascending then id. Check missing before completed. If you blank on the live OA, StealthCoder can cover you.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Task Management System cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Coinbase's OA.

Coinbase reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Task Management System FAQ

How hard is the Coinbase Task Management System problem really?+

It's easy to medium. No tricky algorithm, just a hash map and careful rules. Most failed attempts come from misreading status transitions or sort orders, not from complexity. Read the return values for each operation twice before you start coding.

What's the trick to passing all the hidden tests?+

Order your checks correctly. Look up the task first for NOT_FOUND, then check for COMPLETED to return NOT_ACTIVE, then check assignment for COMPLETE. Also keep the assignee when WRITE updates an unfinished task. Those four cases cover most edge-case failures.

Do I need a heap or a sorted structure for LIST and SEARCH?+

No. The total records examined across SEARCH, LIST and CHECK_OVERDUE is capped at 200000, so scanning a hash map and sorting the matches is fast enough. A fancier structure adds bugs without helping. Keep it simple.

How do I handle overdue comparisons correctly?+

Use strict less than: dueAt < timestamp. The first example shows due 10 is not overdue at timestamp 10 but is at 11. Only include unfinished tasks assigned to that user, then sort by dueAt ascending and taskId ascending.

How should I prepare for this in 48 hours?+

Write the solution once from scratch with a map of task records and one handler per operation. Then run the three examples by hand, especially example 2 for status errors. Practice string-row output formatting, since every operation returns a row, including empty ones.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Coinbase.

OA at Coinbase?
Invisible during screen share
Get it