Company: Trilogy Innovations Sde intern Oncampus_17july
Difficulty: medium
You've been asked to program a bot for a popular bank that will automate the management of incoming requests. Every request has its own timestamp in seconds , and it is guaranteed that all requests come sequentially, i.e. the timestamp is strictly increasing. There are two types of incoming requests: deposit <timestamp> <holder_id> <amount> - request to deposit amount amount of money in the holder_id account. withdraw <timestamp> <holder_id> <amount> - request to withdraw amount amount of money from the holder_id account. As a bonus, the bank also provides a cashback policy: 2% of the withdrawn amount, rounded down to the nearest integer , is returned to the account exactly 24 hours (86400 seconds) after the request timestamp. If a cashback and a deposit/withdrawal happen at the same timestamp, assume the cashback happens earlier. Your system should also handle invalid requests. There are two types of invalid requests: invalid account number; withdra