Reported September 2026
Plaidmath

Total Pipeline Completion Time

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

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

Plaid's September 2026 OA has a problem that looks like a simulation and isn't. Total Pipeline Completion Time gives you rows of [taskTime, taskCount] and one worker running everything back to back. The catch sits in the constraints: counts go up to 10^9, so looping through individual tasks is dead on arrival. It's really a sum of products wearing a pipeline costume. If you've got an invite and 48 hours, this one is a quick win once you spot it. StealthCoder is there as a safety net on the live OA if you blank on the overflow detail.

The problem

Each row of tasks is [taskTime, taskCount]. A single worker processes every task sequentially. Each of the taskCount tasks in that row takes exactly taskTime time units.
Return the time when all tasks from all rows have completed.

Function
totalPipelineTime(tasks: int[][]) → long

Examples
Example 1
tasks = [[3,4],[5,2]]
return = 22
Four three-unit tasks and two five-unit tasks take 12 + 10 time units.
Example 2
tasks = [[7,1]]
return = 7
The only task takes seven units.
Example 3
tasks = [[2,0],[4,3]]
return = 12
The zero-count row contributes nothing.

Constraints
1 <= tasks.length <= 10^5.
0 <= taskTime, taskCount <= 10^9.
The answer fits a signed 64-bit integer.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick is one line of math. One worker, sequential, no gaps, so total time is the sum of taskTime * taskCount across every row. Don't expand tasks, don't simulate a clock. With up to 10^5 rows, a single pass is O(n), which is all you need. Brute force at 10^9 tasks per row would never finish. The real pitfall is overflow. taskTime and taskCount can each hit 10^9, so one product hits 10^18. In Java or C++ cast to long before multiplying, or int math will silently wrap and give wrong answers on the big tests. Python doesn't care. Zero-count rows contribute nothing, which falls out naturally. The statement says the answer fits a signed 64-bit integer, so a long accumulator is safe. If you freeze mid-assessment, StealthCoder can hand you the one-pass solution fast, but this is a five-minute problem if you remember the cast.

Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.

If this hits your live OA

You can drill Total Pipeline Completion Time 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. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Plaid reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Total Pipeline Completion Time FAQ

What's the trick in Total Pipeline Completion Time?+

Ignore the pipeline story. One worker runs tasks sequentially with no idle time, so the answer is the sum of taskTime times taskCount over all rows. One loop, one running total. No sorting, no simulation, no data structure needed.

Why can't I just simulate each task?+

Because taskCount can be 10^9 per row and there can be 10^5 rows. Iterating over individual tasks means up to 10^14 steps, which can't finish. Multiplying per row collapses each row to a single operation, giving O(n) total.

Where do people lose points on this one?+

Integer overflow. A single product can reach 10^18, which blows past a 32-bit int. In Java or C++ cast to long before multiplying, not after. Also use a long accumulator. Python users are safe because integers are arbitrary precision.

How do zero values affect the answer?+

They don't need special handling. A row with taskCount 0 multiplies to 0 and adds nothing, as in Example 3 where [2,0] is ignored and [4,3] gives 12. A taskTime of 0 behaves the same way, so no branching is required.

How should I prepare in 48 hours for an OA like this Plaid one?+

Practice spotting when a simulation collapses into arithmetic. Read constraints first, and if values hit 10^9, look for a formula. Rehearse overflow habits in your language. Then do a few array and prefix-sum style problems so the one-pass pattern feels automatic.

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

OA at Plaid?
Invisible during screen share
Get it