Back to problems

Banking System Operations

Object-Oriented Programming · PayPal · Hard

Design a simulation of a basic banking system that supports the following operations: createAccount(accountId: str, timestamp: int) – Opens a new account with the given identifier. deposit(accountId: str, amount: int, timestamp: int) – Adds the specified amount to an existing account. transfer(fromId: str, toId: str, amount: int, timestamp: int) – Moves money from one account to another. getTopSpenders(n: int, timestamp: int) -> List[Tuple[str, int]] – Returns at most n…

Checking your access…