Stripe·Software Engineer·Technical Phone Screen
- You're processing a stream of bank transactions with account name, timestamp, currency, and amount fields. Positive amounts are credits, negative are debits. If a transaction would push an account's balance below zero, reject it and keep the balance unchanged. After processing everything, return all accounts with non-zero balances and the list of rejected transactions in the original order.
“The core structure is a hash map keyed by account name.”