Back to problems

Account Balance Processor

Algorithm · Stripe · Medium

A payment processor receives a sequence of transaction records that need to be aggregated into per-account balances. Each record is provided as a single string containing four comma-delimited values: The first field is a unique string identifying the transaction (for instance "txn_001"). The second field is a non-empty account identifier, such as "user_A" or "company_X", representing a wallet, customer, or business account. An integer amount; a positive value indicates a…

Checking your access…