Banking — Deposit / Withdraw / Transaction / Balance

Asked at Airbnb · Coding Questions · Difficulty: Easy · Last asked Feb 19, 2026

Implement a bank account class supporting `deposit(timestamp, amount)`, `withdraw(timestamp, amount)`, `transaction_history(start, end)`, and `balance(timestamp)`. Time-range queries should run faster than linear scan when histories grow large.

Loading the problem…