Object-Oriented Programming · Airbnb · Easy
Design a banking system that lives entirely in memory. It must let callers open accounts, add money to them, move money between them, and rank accounts by how much they have spent. Account IDs are strings, and every amount is a positive integer. For each account, keep track of two values: its current balance and its total outgoing transfer amount. That outgoing total grows only through transfers that succeed; deposits never affect it. Support the following operations:…