Company: High Radius_23aug
Difficulty: medium
Add K Time Series Problem Description You have been given information regarding K time series data. A Discrete time series is an array of (time_i, value_i). Let T1 = {(0,1), (3,5), (7,2)} Let T2 = {(2,2), (3,3), (6,1)} The time series denotes the spike at time `time_i` with a magnitude of `value_i`. The magnitude remains same until a new spike occurs with an updated magnitude. For T1, value = 1 for (0,3), 5 for (3,7), 2 for (7,inf) For T2, value = 2 for (0,2), 3 for (2,6), 1 for (6,inf) Adding T1 and T2 results in a new time series = {(0,1), (2,2), (3,8), (6,1), (7,2)} Given K such time series, Print the resultant time series after adding all K time series. Input First line contains one integer K corresponding to the number of time series data. K Lines follow in similar manner as below :- A single line containing the size N_i, of the i_th time series. N_i space separated integers corresponding to time_i for the i_th time series. N_i space separated integers corresponding to value_i for