Company: ethos_20sep
Difficulty: medium
Pod Failure Problem Description A deployment automation team is analyzing pod failures. There are n logs where the i th log is denoted by logs[i] containing two integers. The log types are: [1, k] : An unused pod was activated with a load of k requests [2, k] : Load of k requests was added to all active pods [3, 0] : One pod with the least load failed For each log of type 3, find the load of the failed pod. Complete the function findFailedPods in the editor with the following parameters: vector<long> findFailedPods(vector<vector<int>> logs) { } Return: long[k] : the loads of the failed pods with the least load Examples Example 0: Input: logs = [[1, 15], [2, 21], [1, 30], [3, 0], [3, 0]] Output: [30, 36] Explanation: Initially, there are no active pods. For [1, 15] : A pod is activated with a load of 15 requests. Active pods: [15] . For [2, 21] : All active pods have their load increased by 21 requests. Active pods: [15+21] = [36] . For [1, 30] : A pod is activated wit