Banking System with Spending Leaderboard

Asked at Coinbase · Coding Questions · Difficulty: Medium · Last asked Mar 4, 2026

Implement a small in-memory bank. Accounts hold integer balances, money moves between accounts, and a leaderboard reports who has sent the most money. Every method takes a `timestamp` (integer milliseconds, non-decreasing across calls) as its first argument; the timestamp does not change the behaviour here.

Loading the problem…