Back to problems

Transaction History System with Add, Delete, and Balance Calculation

Object-Oriented Programming · Coinbase · Easy

Design a ledger that processes a list of transfer records. Every transfer is a string with the format "sender -> receiver, amount". All accounts begin with a balance of 0. After all transfers have been applied, one transfer from the list is deleted and the balances are recalculated as if that transfer had never existed. A transfer decreases the sender’s balance by amount and increases the receiver’s balance by amount. Return a map of account names to their final integer…

Checking your access…