Reported October 2026
ZipRecruiterdesign

Four-Level Banking System with Scheduled Payments

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

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

The detail that matters in this ZipRecruiter OA, reported in October 2026, is that scheduled payments fire before the query that triggers them, not after. In Example 1, the payment at timestamp 8 lands before the deposit, so 100 minus 30 plus 1 gives 71. It's a four-level banking system, a design problem where each level piles a new rule onto the last. Accounts, transfers, top spenders, scheduled payments, cancellations, merges, and historical balances all share one state. If you've got an OA invite, expect a lot of bookkeeping and very little clever algorithm. StealthCoder is the safety net if you blank live.

The problem

Process strictly increasing timestamped string queries. Before each query, execute due scheduled payments by due time then creation order.
CREATE_ACCOUNT,t,id, DEPOSIT,t,id,amount, and TRANSFER,t,source,target,amount.
TOP_SPENDERS,t,n ranks active accounts by outgoing total descending then ID ascending, formatted id(total).
SCHEDULE_PAYMENT,t,id,amount,delay returns a global payment ID; a due payment debits and counts as outgoing only when funds suffice. CANCEL_PAYMENT,t,id,payment cancels an owned pending payment.
MERGE_ACCOUNTS,t,first,second absorbs second into first, carrying balance, outgoing total, pending payments, and history.
GET_BALANCE,t,id,timeAt returns the latest balance at or before timeAt, or empty when unavailable.
Return one serialized string per query; invalid numeric operations return empty, and booleans use lowercase.

Function
processBankingQueries(queries: String[][]) → String[]

Examples
Example 1
queries = [["CREATE_ACCOUNT","1","a"],["DEPOSIT","2","a","100"],["SCHEDULE_PAYMENT","3","a","30","5"],["GET_BALANCE","4","a","2"],["DEPOSIT","8","a","1"]]
return = ["true","100","payment1","100","71"]
The payment executes at timestamp 8 before the deposit.
Example 2
queries = [["CREATE_ACCOUNT","1","a"],["CREATE_ACCOUNT","2","b"],["DEPOSIT","3","a","50"],["TRANSFER","4","a","b","20"],["TOP_SPENDERS","5","2"]]
return = ["true","true","50","30","a(20),b(0)"]
The transfer contributes 20 outgoing for a.

Constraints
1 <= queries.length <= 500
Timestamps are unique and strictly increasing.
Amounts and delays are positive.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The pattern is design plus simulation. Keep a map of accounts, each with balance, outgoing total, and a balance history list of (time, balance). Keep a global pending-payment list ordered by due time, then creation ID. At the top of every query, pop and execute everything due at or before the current timestamp. Execute means debit only if funds suffice, and only then add to outgoing. GET_BALANCE is a binary search or backward scan over history for the last entry at or before timeAt. The pitfalls are merge and ownership. On merge, move pending payments to the surviving account, add balances and outgoing totals, and merge histories. Cancel must check the owner. Also push a history entry on every balance change, including payments fired by the scheduler. Queries are capped at 500, so brute force is fine. Write clean helper methods first. If the merge logic or due-order tie-breaking falls apart mid-assessment, StealthCoder is the hedge that reads the screen and hands you a working structure.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Four-Level Banking System with Scheduled Payments 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. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

ZipRecruiter reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Four-Level Banking System with Scheduled Payments FAQ

What's the trick in the ZipRecruiter banking system OA?+

Run due scheduled payments before processing each query, ordered by due time then creation order. Most wrong answers handle the query first and the payment second. Do it as the first line of your main loop, and every example becomes easy to trace.

How hard is this problem really?+

Medium on algorithms, hard on discipline. With at most 500 queries, nothing needs optimizing. The difficulty is keeping balance, outgoing totals, history, and pending payments consistent across merges and cancellations. One missed history update breaks GET_BALANCE.

How should I store balance history for GET_BALANCE?+

Append a (timestamp, balance) pair to each account's list on every balance change, including scheduled payments and merges. Then scan backward or binary search for the latest entry at or before timeAt. Return empty if none exists, such as before the account was created.

How do I handle MERGE_ACCOUNTS safely?+

Add the second account's balance and outgoing total to the first, reassign its pending payments to the first, merge the histories, then delete the second. Record a new balance entry at the merge timestamp. Test that a payment scheduled on the merged account still fires from the survivor.

How do I prepare for this in 48 hours?+

Skip new topics. Write a small design skeleton: a class with a query dispatcher, helper methods per command, and a scheduler run first. Then hand-trace both examples. Practice one feature-layered design problem so adding levels feels routine, not like a rewrite.

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

OA at ZipRecruiter?
Invisible during screen share
Get it