On a recent Hackerrank interview I was faced with the following problem:
Given a set of timestamps (format 2019-11-26 11:00) and their corresponding stock prices (single float value), approximate the missing stock prices for a set of timestamps.
I tried solving it with an SVR model at first, but I had to realize that none of the usual data science libraries were available for this test.
How would you solve this problem without data science libraries in a limited amount of time?
I ended up doing the following: Took the nearest available measurements and solved the y = mx + b equation based on them, so my prediction would be the corresponding y value for my x.
This seemed to solve the problem quite well for the given test case. My solution in Python