1
# Runtime: 1834 ms (Top 5.30%) | Memory: 43.9 MB (Top 45.70%)4
def __init__(self, bal: List[int]):5
self.store = bal # storage list7
def transfer(self, a1: int, a2: int, money: int) -> bool:9
# checking if both accounts exist. and if the transaction would be valid10
if self.store[a1 - 1] >= money and self.store[a2 - 1] >= 0:11
# performing the transaction12
self.store[a1 - 1] -= money13
self.store[a2 - 1] += money16
# retrning false on invalid transaction19
# returning false when accounts don't exist22
def deposit(self, ac: int, mn: int) -> bool:24
# if account exists performing transaction25
self.store[ac - 1] += mn28
# returning false when account doesn't exist31
def withdraw(self, ac: int, mn: int) -> bool:33
# checking if transaction is valid34
if self.store[ac - 1] >= mn:35
# performing the transaction36
self.store[ac - 1] -= mn39
# returning false in case on invalid transaction42
# returning false when account doesn't exist