Company: Nvidia_7feb
Difficulty: medium
Calculate Pending Orders Problem Description Suppose Amazon is handling a set of customer orders that need to be processed. These orders are represented by orderProcessTime[i] , where i represents the index of the order. Amazon processes the orders sequentially, completing one order before moving on to the next. Amazon operates in shifts, with each shift having a specific duration, shiftDuration[i] , where i is the shift number. If an order is not fully processed by the end of a shift, it will be continued in the next shift. After all the orders in the current shift are processed, Amazon starts again from the first order at the beginning of the next shift. Your task is to determine the remaining pending orders at the end of each shift. Function Description Complete the function calculatePendingOrders in the editor below. calculatePendingOrders has the following parameters: int orderProcessTime[] : the processing time for each order. int shiftDuration[] : the duration of each shift in A