Company: Amazon Ml school_3aug
Difficulty: medium
Cake Factory Problem Description You are a manager at a cake factory, which has A orders to complete. Pam and Sam are workers at your factory. Every order needs to be worked on by both of them. On every order, Pam will work first and after that Sam. For the i th order (for every i from 1 to A), Pam needs to work for B[i] time and Sam needs to work for C[i] time. The first input is a single integer A , representing the number of orders. The second input is an integer array B , where B[i] is the time Pam needs for the i th order. The third input is an integer array C , where C[i] is the time Sam needs for the i th order. Return a single integer that is the minimum time required to complete all orders. Function Signature long Solution::solve(int A, std::vector &B, std::vector &C) { // Function body to be implemented } Examples Example 1: Input: A = 4, B = [3, 2, 2, 4], C = [1, 2, 3, 4] Output: 13 Explanation: First Pam will finish work on the 2nd cake which takes 2 minutes. All this time