DSA Round
Questions: Given two time series data lists,
First List
[(1, 3), (3, 1), (5, 3), (6, 4), (10, 1)]
Explanation:
What this means is that at timestamp 1 the value is 3, and then at timestamp 3 the value is 1 and so on.
Note: Missing/Undefined value on any timestamp is extrapolated backwards from the next timestamp. For example, value at timestamp 2 based on the example above would be 1.
Second List
[(2, 3), (6, 3), (9, 2)]
Write a function to aggregate these two time series data into one.
Answer
[(1, 6), (2, 4), (3, 4), (5, 6), (6, 7), (9, 3), (10, 1)]
Solution: Merge sort
Follow-up Question
What if there are N time series lists are given in the above question?
Candidate's Approach
The candidate proposed a divide and conquer approach to handle the aggregation of N time series lists.
Interviewer's Feedback
No feedback provided.