Company: Codenation_23june
Difficulty: medium
Bank Account Management Problem Description Your system should also handle invalid requests. There are two types of invalid requests: invalid account number; withdrawal of a larger amount of money than is currently available. For the given list of initial balances and requests , return the state of balances straight after the last request has been processed, or an array of a single element [-<request_id>] (please note the minus sign), where <request_id> is the 1-based index of the first invalid request. Note that cashback requests which haven't happened before the last request should be ignored. Examples Example 1: Input: balances = [1000, 1500] requests = ["withdraw 1613327630 2 480", "withdraw 1613327644 2 800", "withdraw 1614105244 1 100", "deposit 1614108844 2 200", "withdraw 1614108845 2 150"] Output: [900, 295] Explanation: Here are the states of balances after each request: Initially: [1000, 1500] "withdraw 1613327630 2 480": [1000, 1020] "withdraw 1613327644 2 800":